packageMobile task problem

daniel.klokov's Avatar

daniel.klokov

15 May, 2014 12:32 PM

Hi guys,

my problem is when I'm using packageMobile task with target=ipa-test-interpreter I can see folder 'build/myswf.swf' inside root folder of IPA package. When I use target=ipa-test then 'build' folder is missing and myswf.swf is inside root forlder of IPA. Application description file has tag <content>build/myswf.swf</content>. I do not receive any errors during packaging but when I start IPA on the actual phone package 'target=ipa-test' does not start because of META-INF/AIR/application.xml is always pointing to 'build/myswf.swf' instead of 'myswf.swf'.

When I include swf in packaging script then IPA always has two swfs inside. One inside build folder and another inside root folder. That does not make any sense.

When I use <content>myswf.swf</content> inside description file I am receiving error "missing root content swf"

Thanks
Daniel

  1. Support Staff 1 Posted by Yennick Trevels on 20 May, 2014 06:56 AM

    Yennick Trevels's Avatar

    Hi Daniel,

    Can you post your GradleFx configuration? Because I can't find the cause of this issue based on our code.

    Thanks,
    Yennick

  2. 2 Posted by daniel.klokov on 02 Jun, 2014 09:06 AM

    daniel.klokov's Avatar

    Hi Yennick,

    I am using Gradle 1.11 and GradleFX 0.8.2. Basically whole process is made of two steps. First step downloads project from SVN (source code and relevant assets) and then starts second step which is separate build script. When the first step is done then there is created folder tree and downloaded certain files from SVN including other gradle build script and settings file:

    -Project/
    --------swc library 1/
    ------------src/
    -----------Build.gradle
    --------swc library 2/
    ------------src/
    ------------Build.gradle
    --------swc library 3/
    ------------src/
    ------------Build.gradle
    --------ane extensions/
    --------main project/
    ------------src/
    ------------Build.gradle
    --------Build.gradle
    --------Settings.gradle

    In settings file I say to gradle a set of sub projects:
    Include swc library 1 swc library2 swc library 3 etc..
    In build script:

    buildscript {
    repositories {
    mavenCentral()
    }
    dependencies {
    classpath group: "org.gradlefx", name: "gradlefx", version: "0.8.2"
    }
    }
    subprojects {
    apply plugin: 'gradlefx'
    apply plugin: 'flashbuilder'
    flexHome = rootProject.flexHomeDir
    additionalCompilerOptions = rootProject.compilerOptions.split("\\|")
    type = "swc"
    }

    ------------------------------------------------------------------
    Each build script inside swc library is basically:
    dependencies{
    external project(':swc library 1')
    }
    //PROJECT TYPE
    type = 'swc'
    //SOURCE FOLDER
    srcDirs = ['/src']
    ------------------------------------------------------------------

    Main project’s build script is:
    dependencies{
    external files(
    '../ane extensions/ane extensions 1.swc',
    '../ane extensions/ane extensions 2.swc ',
    '../ane extensions/ane extensions 3.swc ',
    '../ane extensions/ane extensions etc...swc '
    )
    merged project(':swc library 1)
    merged project(': swc library 2)
    merged project(': swc library 3)
    merged project(': swc library etc..)
    }
    //PROJECT TYPE: MOBILE
    type = 'mobile'
    //FB 4.7 BY DEFAULD MERGES FRAMEWORK
    frameworkLinkage = 'merged'
    //PROJECT MAIN APP FILE
    mainClass = 'projectnamemainclass.mxml'
    //CERTIFICATE AND ITS PASSWORD
    //PROJECT DESCRIPTION FILE AND ASSETS WHICH WILL BE INCLUDED IN FINAL PACKAGE
    air {
    keystore = 'ios_certificate.p12'
    storepass = 'xxxxx'

    applicationDescriptor = 'src/main/actionscript/'projectnamemainclass -app.xml'

    includeFileTrees = [
            fileTree(dir: 'src/main/actionscript/', include: '*.png')
    ]
    }
    //PROVISIONING PROFILE
    //PACKAGE PLATFORM, TYPE AND EXTENSIONS (ANES)
    //THERE WILL BE USED ADT TOOL TO PACKAGE FINAL PACKAGE. ADT IS USING ANES WITH 'ANE' EXTENSION
    airMobile {
    provisioningProfile = 'Provisioning_Profile.mobileprovision'
    platform = 'ios'
    outputExtension = 'ipa'
    target = rootProject.packageTarget
    extensionDir = '../ane extensions/libs/'
    }
    //DESKTOP SIMULATOR SETTINGS
    adl {
    profile = 'mobileDevice'
    screenSize = 'iPad'
    }

    ------------------------------------------------------------------
    File descriptor inside main project:
    <content>build/swf.swf</content>
    ------------------------------------------------------------------

    When I run gradle packageMobile with set target = ipa-test-interpreter then I can see build/swf.swf inside IPA package and app starts well. But when I set target = ipa-app-store then swf.swf is in root folder of IPA package and build folder is missing, app does not start.

    Many thanks
    Daniel

  3. 3 Posted by daniel.klokov on 23 Jun, 2014 01:50 PM

    daniel.klokov's Avatar

    Hi guys,

    any news on this? I'm still trying to figure this out but no luck..

    Many thanks
    Daniel

  4. Support Staff 4 Posted by Yennick Trevels on 23 Jun, 2014 06:04 PM

    Yennick Trevels's Avatar

    I've been looking at our GradleFx code(*1) and at the AIR documentation(*2), but I can't find why it goes wrong.
    We use the following statement to add the swf to the ipa package:

    addArgs "${project.buildDir.name}/${flexConvention.output}.${FlexType.swf}"
    

    This is the same for every mobile package that's being compiled, so I would expect the output to be the same. Unless AIR threats this in a different way, but they don't state something like that in their documentation.

    Sadly I don't have an iOS developer account, so no way to create a provisioning profile and an iOS test application (got an Android phone). So I can only base myself on the code/documentation.

    *1: https://github.com/GradleFx/GradleFx/blob/master/src/main/groovy/or...
    *2: http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac35eb7b4e12c...

  5. 5 Posted by daniel.klokov on 25 Jun, 2014 10:58 AM

    daniel.klokov's Avatar

    Hi Yennick Trevels,

    many thanks for your support. I commented that line inside plugin and manually added swf in build script. Now everything works as expected. I didn't test packing apk package. That will be my next step

    Regards
    Daniel

  6. 6 Posted by Dmitry on 30 Jun, 2014 12:34 PM

    Dmitry's Avatar

    Hi Yennick Trevels.

    I have the same issue like Daniel was described.
    Could you please remove adding swf to adl params. it will more flexible and every developer can set it like he want

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac