ハイブリッドアプリをApple TestFlightへアップロードする方法

フロー:

coderwall.com

 

手順

Getting Started Deploy Mobile Hybrid App To Apple TestFlight

Create test app on iTunes connect

  1. Goto iTunesConnect and create app

New App を選択

Add Certificate to your OS X Reference Link

Note * Skip this step if you're already connect your account with xCode

  1. Goto Apple Member Center

  2. Goto Identifiers session choose App IDs and create new

  3. Goto Device session click Development and create new

iPhoneなどをパソコンに接続して、XCode のWindow>DevicesからそのデバイスのIDを調べて登録する。100件まで登録可能。

iOS端末のUDIDの確認方法 - jubilee

  1. Goto Provisioning Profiles session and add your device

まずはDevelopmentから作る。あとでDistributionも作る。

 

About Creating a Certificate Signing Request (CSR) 

To manually generate a Certificate, you need a Certificate Signing Request (CSR) file from your Mac. To create a CSR file, follow the instructions below to create one using Keychain Access.

In the Applications folder on your Mac, open the Utilities folder and launch Keychain Access.

Within the Keychain Access drop down menu, select Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.

  • In the Certificate Information window, enter the following information:
    • In the User Email Address field, enter your email address.
    • In the Common Name field, create a name for your private key (e.g., John Doe Dev Key).
    • The CA Email Address field should be left empty.
    • In the "Request is" group, select the "Saved to disk" option.
  • Click Continue within Keychain Access to complete the CSR generating process.

 これを見て作る。

iOS実機開発手順#4-1 Provisioning Profiles ( Macintosh ) - エビ - Yahoo!ブログ

 

その後:

When your CSR file is created, a public and private key pair is automatically generated. Your private key is stored on your computer. On a Mac, it is stored in the login Keychain by default and can be viewed in the Keychain Access app under the "Keys" category. Your requested certificate is the public half of your key pair.

Upload CSR file.

Select .certSigningRequest file saved on your Mac.

 

参考サイト

Getting Started Deploy Mobile Hybrid App To Apple TestFlight · rotati/wiki Wiki · GitHub

iOS実機開発手順#4-1 Provisioning Profiles ( Macintosh ) - エビ - Yahoo!ブログ

Connect xCode to iTunes connect

Open ionic project with Xcode:

参考

Deploy an Ionic App to the iOS App Store — waaws-thinks — Medium

iOS Platform Guide - Apache Cordova

ionic platform add ios

    $ cordova platform add ios
    $ cordova prepare              # or "cordova build"

 

config/xml を編集

https://coderwall.com/p/vvkyra/getting-started-with-ionic

Build process

The Build system is the process of compiling these apps into an .ipa file for IOS and .apk file for Android. We can use PhoneGap build for this, or Cordova build. PhoneGap is $9.99 per month for private repositories, Cordova is free and as simple as the commands below. The cordova and ionic build commands are one and the same in terms of functionality so just pick one of them.

cordova build --release android
cordova build --release ios

ionic build ios
ionic build ios

Getting started with Ionic (Example)

 

 

Build new iOS xcode project every time again? - ionic - Ionic

IMPORTANT: Whenever you make a change in your project or to the config.xml file, you must remember to run the command:

ionic prepare ios

in order to update your ios project folder with the latest changes.

 

 

Open file with name ending with "xcodeproj" in folder platform/ios

  1. Add apple developer account > Preferences > Accounts tab and add

  1. Goto Xcode tool bar > Product > Analyze.This runs a full check errors on all files

AppIcon has an unassigned child というエラーが出ていた。

参考:

[Xcode] icon画像の設定で警告が結構出た: スタジオプリズム㐧3ブログ

しかし今回は、unassigned というオブジェクトは見当たらなかったため、無視して次へ。

  1. Goto Product > Archive click Submit to App Store, choose your account and submit (make sure your Bundle Identifier same as app that you created)

 

Archiveが灰色になっていて、クリックできない場合:

provisioning - Xcode Product -> Archive disabled - Stack Overflow

 

  1. Check your iTunes Connect and invite user

 

 

github.com

 

 

 

mzgk.github.io

GreenSock, TweenLite 動かない時

デモ:

https://codepen.io/GreenSock/pen/GFBvn

 

問題:

2回目以降のレンダリング(ハイブリッドアプリの該当画面の表示)ではTweenLiteオブジェクトの配置が何も指定されていないのと同じようになる

 

解決策:

JavaScriptでのオブジェクトマークアップをなくし、すべてのスタイリングをCSSで行う

Javascriptファイルのなか:

// TweenLite.set($container, {height: 90+"%", width: 100+"%"});
// TweenLite.set($coin, {width:30+"%", height:10+"%", lineHeight:10+ "%"});
// TweenLite.set($sensor, {width:50+"%", height:50+ "%", lineHeight:1+ "%"});

TweenLite.set($container, {});
TweenLite.set($coin, {});
TweenLite.set($sensor, {});

 

 問題:

2回目以降のレンダリング(ハイブリッドアプリの該当画面の表示)ではdragが使えない(ことがある)

・Position: absolute を用いてオブジェクトを再配置する

 

問題:

2回目以降のレンダリング(ハイブリッドアプリの該当画面の表示)ではhitTestが使えない

 

もともとのコード例

if (Draggable.hitTest('#test')) {
    console.log('hit');
}

 

 

解決策の案:

hitTest = this.hitTest("#drop1", e);

greensock.com

 
function hit_test(){
if(this.Draggable.hitTest($sensor, overlapThreshold)){console.log('hit')}
}

 

=> Uncaught Error: Syntax error, unrecognized expression: 50% 

 

overlapThesholdの値がunrecognized.

 

原因候補

備忘6 » Post Topic » jQuery mobileでリロードしないとJavascriptが動かない場合

 

・onModal Show

Event after Modal show - Ionic

 

「実行タイミングがクイックビュー機能により意図的に変更される?」 

 

参考

http://greensock.com/forums/topic/14745-animation-lagging-sometimes/

http://greensock.com/forums/topic/1960-tweens-not-always-completing/

http://greensock.com/forums/topic/10964-bug-report-with-rotate180deg-tweenmax-sometimes-does-the-wrong-matrix-conversion/

 

 

他のサイト

 

・キャッシュのせいでajaxが二回目以降動かない

IEでAjaxのスクリプトが初回処理後に動かない原因!一時ファイルの設定で解決する方法! | 自作PCテクニカルセンター

(未解決)ionic run androidが止まる件

 

 

➜ test ionic run android
Running command: /Users/local/ionic_projects/test/hooks/after_prepare/010_add_platform_class.js /Users/local/ionic_projects/test
add to body class: platform-android
ANDROID_HOME=/Users/local/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
No target specified, deploying to emulator
No emulator specified, defaulting to Nexus_5_API_21_x86
Waiting for emulator...
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX is not installed on this machine (/dev/HAX is missing).

ionic android build: Execution failed for task ':CordovaLib:compileDebugJavaWithJavac'.

ionic build androidでのエラー:

Execution failed for task ':CordovaLib:compileDebugJavaWithJavac'.

詳細:

➜ test ionic build android
Running command: /Users/local/ionic_projects/test/hooks/after_prepare/010_add_platform_class.js /Users/local/ionic_projects/test
add to body class: platform-android
Error: Please install Android target: "android-23".

Hint: Open the SDK manager by running: /Users/local/Library/Android/sdk/tools/android
You will require:
1. "SDK Platform" for android-23
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)
➜ test ionic build android
Running command: /Users/local/ionic_projects/test/hooks/after_prepare/010_add_platform_class.js /Users/local/ionic_projects/test
add to body class: platform-android
ANDROID_HOME=/Users/local/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac/Users/local/ionic_projects/test/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java:222: error: cannot find symbol
getActivity().requestPermissions(permissions, requestCode);
^
symbol: method requestPermissions(String,int)
location: class Activity
/Users/local/ionic_projects/test/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java:228: error: cannot find symbol
getActivity().requestPermissions(permissions, requestCode);
^
symbol: method requestPermissions(String
,int)
location: class Activity
/Users/local/ionic_projects/test/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java:233: error: cannot find symbol
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
^
symbol: variable M
location: class VERSION_CODES
/Users/local/ionic_projects/test/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java:235: error: cannot find symbol
int result = activity.checkSelfPermission(permission);
^
symbol: method checkSelfPermission(String)
location: variable activity of type Activity
/Users/local/ionic_projects/test/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java:493: error: method does not override or implement a method from a supertype
@Override
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
5 errors
FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 7.946 secs
Error: Error code 1 for command: /Users/local/ionic_projects/test/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/local/ionic_projects/test/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

 

解決策1:

stackoverflow.com

 

解決策2;

Android Studio> Preferences>AppearanceからSDKの最新版をインストール

 

もと:

ionicframework.com