Posted on

使用Flex編譯出ios的ipa檔案

這邊提供一些我看到的教學影片及連結

1.在Windows上一步步發佈的方式

http://support.brightcove.com/en/docs/step-step-guide-publishing-apple-app-store-using-windows

2. 使用Flex編出ipa的教學

http://tv.adobe.com/watch/adc-presents/build-ios-applications-using-flex-and-flash-builder-45/

3. 怎麼在windows上產生.p12檔案

4. 在Flex裡安裝AIR SDK的方式

http://helpx.adobe.com/flash-builder/kb/error-run-debug-deploy-ios.html

http://www.flashdeveloper.co/post/10985842021/overlay-adobe-air-32-in-flash-builder-46

其實最基本的可以就依照這篇文章去做一步步的發佈設定

如果不想太快買開發者身份 也可以到google 打上fake .p12 ,下載破解檔案

就可以直接做發佈的設定了!

===================================

另外也提供不使用flex去做發佈的方式

1.安裝 adobe AIR SDK,請將以下壓縮檔,解到自己電腦任意目錄中

 http://www.adobe.com/devnet/air/air-sdk-download.html

例如,我電腦中,我解到:E:\software\AdobeAIRSDK

 

2.準備 command line 批次檔 build.bat,檔案內容如下:

 

set SDK_HOME=E:/software/AdobeAIRSDK à 換成你放 air sdk 的位置

set ADT_JAR=%SDK_HOME%/lib/adt.jar

 

set APP_NAME=HorseRacingDemo à 換成你專案的名稱,會用來找對應的 xxx.swf 與 xxx-app.xml,並發布成 xxx.ipa

set APP_ROOT_DIR=C:/Users/ben.chang/Desktop/新增資料夾 à 所有東西放置的資料夾

set BUILD_DIR=%APP_ROOT_DIR%

set APP_ROOT_FILE=%APP_NAME%.swf

set APP_DESCRIPTOR=%APP_NAME%-app.xml

set IPA_NAME=%APP_NAME%.ipa

set STORETYPE=pkcs12

set KEYSTORE=FakeCert.p12

set STOREPASS=1234

set PROVISIONING_PROFILE=Fake.mobileprovision

 

java -jar %ADT_JAR% -package -target ipa-debug -provisioning-profile %APP_ROOT_DIR%/%PROVISIONING_PROFILE% -storetype %STORETYPE% -keystore

 

%APP_ROOT_DIR%/%KEYSTORE% -storepass %STOREPASS% %APP_ROOT_DIR%/%IPA_NAME% %APP_ROOT_DIR%/%APP_DESCRIPTOR% -C %BUILD_DIR% %APP_ROOT_FILE%

 

pause

 

3.準備 xxx-app.xml

 

我的 Flash CS 5.0,設定輸出 ipad 產出的 xml 為:

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no” ?>

<application xmlns=”http://ns.adobe.com/air/application/2.0“>

<id>no-name</id>

<version>1.0</version>

<filename>?芸??1</filename>

<description/>

<name>?芸??1</name>

<copyright/>

<initialWindow>

<content>?芸??1.swf</content>

<systemChrome>standard</systemChrome>

<transparent>false</transparent>

<visible>true</visible>

<fullScreen>false</fullScreen>

<aspectRatio>portrait</aspectRatio>

<renderMode>auto</renderMode>

<autoOrients>false</autoOrients>

</initialWindow>

<icon/>

<customUpdateUI>false</customUpdateUI>

<allowBrowserInvocation>false</allowBrowserInvocation>

<iPhone>

<InfoAdditions>

      <![CDATA[<key>UIDeviceFamily</key><array><string>2</string></array>]]>

    </InfoAdditions>

</iPhone>

</application>

 

設定輸出 iphone 的 xml 為:

 

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no” ?>

<application xmlns=”http://ns.adobe.com/air/application/2.0“>

……

……

<iPhone>

 <InfoAdditions>

      <![CDATA[<key>UIDeviceFamily</key><array><string>1</string></array>]]>

    </InfoAdditions>

</iPhone>

</application>

 

設定輸出 iphone 與 ipad 的 xml 為:

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no” ?>

<application xmlns=”http://ns.adobe.com/air/application/2.0“>

……

……

<iPhone>

 <InfoAdditions>

      <![CDATA[<key>UIDeviceFamily</key><array><string>1</string><string>2</string></array>]]>

    </InfoAdditions>

</iPhone>

</application>

 

4.資料夾中準備好相關檔案:

 

l   xxx.swf

l   xxx-app.xml

l   build.bat

l   FakeCert.p12

l   Fake.mobileprovision

 

譬如,我在自己電腦桌面上開一新資料夾,如下畫面:

執行 build.bat 大約一兩分鐘 就可產出 *.ipa