You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by "Erik J. Thomas" <er...@linqto.com> on 2017/08/28 18:36:04 UTC

Accessing app bundle_id or package_id at runtime

Hey all:

Is there a simple way to access a Flex mobile app's bundle/package ids at runtime? Of course I can write the code to parse Info.plist and manifest files on iOS and Android to get them, but it seems there must be a built-in "Flex" way that some great Apache engineer anticipated someone would need.

I have an unusual scenario in that we "brand" existing APK and IPA files by changing their bundle ids and by modifying the packages (IPA and APK files) and re signing them without compiling the app. The App doesn't have any idea what it's bundle/package id is at runtime and we need that to hit an authentication server API.

I've poked around the docs and searched the web and am coming up empty handed. Just hoped I could save some time.

Thanks!

Erik


Re: Accessing app bundle_id or package_id at runtime

Posted by "Erik J. Thomas" <er...@linqto.com>.
Hi Josh, thanks for your input.

But no, there is not an app.xml in the IPA or APK outside of the binary file within the package. The app descriptor file is compiled into the AIR executable within the IPA/APK package. It's not accessible in the enclosing package (zip) file.

I'll just parse Info.plist and manifest.xml to get this info at runtime. It's not a big deal. Just figured some bright Apache warrior engineer thought of adding a configuration utility to Flex to retrieve runtime info from the app package like the Platform utility (which is awesome by the way, thanks to whomever did that).

Cheers,

Erik

On Aug 28, 2017, at 4:08 PM, Josh Tynjala <jo...@gmail.com> wrote:

Could your branding process be improved to also modify the -app.xml file
that's inside the IPA? Then you could use the suggested approach.

- Josh

On Aug 28, 2017 3:46 PM, "Erik J. Thomas" <er...@linqto.com> wrote:

Hey OmPrakash:

Thanks for responding, this approach won't work. This is static, build-time
data. Our branding process takes the IPA, unzips it, changes the bundle_id
in Info.plist, changes app name, and lots of other stuff. Then it zips back
up and signs with certs and publishes to iTunes Connect.

Reading app descriptor is reading the original bundle_id from compile time.

Thanks though.

Erik

On Aug 28, 2017, at 11:51 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

Have you tried this?
http://help.adobe.com/en_US/AIR/1.5/devappshtml/
WS5b3ccc516d4fbf351e63e3d118676a5e5e-7fff.html

On Mon, Aug 28, 2017 at 11:36 AM, Erik J. Thomas <er...@linqto.com> wrote:

> Hey all:
> 
> Is there a simple way to access a Flex mobile app's bundle/package ids at
> runtime? Of course I can write the code to parse Info.plist and manifest
> files on iOS and Android to get them, but it seems there must be a
built-in
> "Flex" way that some great Apache engineer anticipated someone would need.
> 
> I have an unusual scenario in that we "brand" existing APK and IPA files
> by changing their bundle ids and by modifying the packages (IPA and APK
> files) and re signing them without compiling the app. The App doesn't have
> any idea what it's bundle/package id is at runtime and we need that to hit
> an authentication server API.
> 
> I've poked around the docs and searched the web and am coming up empty
> handed. Just hoped I could save some time.
> 
> Thanks!
> 
> Erik
> 
> 


Re: Accessing app bundle_id or package_id at runtime

Posted by Josh Tynjala <jo...@gmail.com>.
Could your branding process be improved to also modify the -app.xml file
that's inside the IPA? Then you could use the suggested approach.

- Josh

On Aug 28, 2017 3:46 PM, "Erik J. Thomas" <er...@linqto.com> wrote:

Hey OmPrakash:

Thanks for responding, this approach won't work. This is static, build-time
data. Our branding process takes the IPA, unzips it, changes the bundle_id
in Info.plist, changes app name, and lots of other stuff. Then it zips back
up and signs with certs and publishes to iTunes Connect.

Reading app descriptor is reading the original bundle_id from compile time.

Thanks though.

Erik

On Aug 28, 2017, at 11:51 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

Have you tried this?
http://help.adobe.com/en_US/AIR/1.5/devappshtml/
WS5b3ccc516d4fbf351e63e3d118676a5e5e-7fff.html

On Mon, Aug 28, 2017 at 11:36 AM, Erik J. Thomas <er...@linqto.com> wrote:

> Hey all:
>
> Is there a simple way to access a Flex mobile app's bundle/package ids at
> runtime? Of course I can write the code to parse Info.plist and manifest
> files on iOS and Android to get them, but it seems there must be a
built-in
> "Flex" way that some great Apache engineer anticipated someone would need.
>
> I have an unusual scenario in that we "brand" existing APK and IPA files
> by changing their bundle ids and by modifying the packages (IPA and APK
> files) and re signing them without compiling the app. The App doesn't have
> any idea what it's bundle/package id is at runtime and we need that to hit
> an authentication server API.
>
> I've poked around the docs and searched the web and am coming up empty
> handed. Just hoped I could save some time.
>
> Thanks!
>
> Erik
>
>

Re: Accessing app bundle_id or package_id at runtime

Posted by "Erik J. Thomas" <er...@linqto.com>.
Hey OmPrakash:

Thanks for responding, this approach won't work. This is static, build-time data. Our branding process takes the IPA, unzips it, changes the bundle_id in Info.plist, changes app name, and lots of other stuff. Then it zips back up and signs with certs and publishes to iTunes Connect.

Reading app descriptor is reading the original bundle_id from compile time.

Thanks though.

Erik

On Aug 28, 2017, at 11:51 AM, OmPrakash Muppirala <bi...@gmail.com> wrote:

Have you tried this?
http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118676a5e5e-7fff.html

On Mon, Aug 28, 2017 at 11:36 AM, Erik J. Thomas <er...@linqto.com> wrote:

> Hey all:
> 
> Is there a simple way to access a Flex mobile app's bundle/package ids at
> runtime? Of course I can write the code to parse Info.plist and manifest
> files on iOS and Android to get them, but it seems there must be a built-in
> "Flex" way that some great Apache engineer anticipated someone would need.
> 
> I have an unusual scenario in that we "brand" existing APK and IPA files
> by changing their bundle ids and by modifying the packages (IPA and APK
> files) and re signing them without compiling the app. The App doesn't have
> any idea what it's bundle/package id is at runtime and we need that to hit
> an authentication server API.
> 
> I've poked around the docs and searched the web and am coming up empty
> handed. Just hoped I could save some time.
> 
> Thanks!
> 
> Erik
> 
> 


Re: Accessing app bundle_id or package_id at runtime

Posted by Josh Tynjala <jo...@gmail.com>.
I'm pretty sure that
NativeApplication.nativeApplication.applicationDescriptor is accessible on
mobile too.

- Josh

On Mon, Aug 28, 2017 at 12:07 PM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> Never mind, that is for desktop apps, not mobile apps.  I'm guessing
> manually parsing those files you mentioned is probably the only way.
>
> On Mon, Aug 28, 2017 at 11:51 AM, OmPrakash Muppirala <
> bigosmallm@gmail.com>
> wrote:
>
> > Have you tried this?
> > http://help.adobe.com/en_US/AIR/1.5/devappshtml/
> > WS5b3ccc516d4fbf351e63e3d118676a5e5e-7fff.html
> >
> > On Mon, Aug 28, 2017 at 11:36 AM, Erik J. Thomas <er...@linqto.com>
> wrote:
> >
> >> Hey all:
> >>
> >> Is there a simple way to access a Flex mobile app's bundle/package ids
> at
> >> runtime? Of course I can write the code to parse Info.plist and manifest
> >> files on iOS and Android to get them, but it seems there must be a
> built-in
> >> "Flex" way that some great Apache engineer anticipated someone would
> need.
> >>
> >> I have an unusual scenario in that we "brand" existing APK and IPA files
> >> by changing their bundle ids and by modifying the packages (IPA and APK
> >> files) and re signing them without compiling the app. The App doesn't
> have
> >> any idea what it's bundle/package id is at runtime and we need that to
> hit
> >> an authentication server API.
> >>
> >> I've poked around the docs and searched the web and am coming up empty
> >> handed. Just hoped I could save some time.
> >>
> >> Thanks!
> >>
> >> Erik
> >>
> >>
> >
>

Re: Accessing app bundle_id or package_id at runtime

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Never mind, that is for desktop apps, not mobile apps.  I'm guessing
manually parsing those files you mentioned is probably the only way.

On Mon, Aug 28, 2017 at 11:51 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> Have you tried this?
> http://help.adobe.com/en_US/AIR/1.5/devappshtml/
> WS5b3ccc516d4fbf351e63e3d118676a5e5e-7fff.html
>
> On Mon, Aug 28, 2017 at 11:36 AM, Erik J. Thomas <er...@linqto.com> wrote:
>
>> Hey all:
>>
>> Is there a simple way to access a Flex mobile app's bundle/package ids at
>> runtime? Of course I can write the code to parse Info.plist and manifest
>> files on iOS and Android to get them, but it seems there must be a built-in
>> "Flex" way that some great Apache engineer anticipated someone would need.
>>
>> I have an unusual scenario in that we "brand" existing APK and IPA files
>> by changing their bundle ids and by modifying the packages (IPA and APK
>> files) and re signing them without compiling the app. The App doesn't have
>> any idea what it's bundle/package id is at runtime and we need that to hit
>> an authentication server API.
>>
>> I've poked around the docs and searched the web and am coming up empty
>> handed. Just hoped I could save some time.
>>
>> Thanks!
>>
>> Erik
>>
>>
>

Re: Accessing app bundle_id or package_id at runtime

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Have you tried this?
http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118676a5e5e-7fff.html

On Mon, Aug 28, 2017 at 11:36 AM, Erik J. Thomas <er...@linqto.com> wrote:

> Hey all:
>
> Is there a simple way to access a Flex mobile app's bundle/package ids at
> runtime? Of course I can write the code to parse Info.plist and manifest
> files on iOS and Android to get them, but it seems there must be a built-in
> "Flex" way that some great Apache engineer anticipated someone would need.
>
> I have an unusual scenario in that we "brand" existing APK and IPA files
> by changing their bundle ids and by modifying the packages (IPA and APK
> files) and re signing them without compiling the app. The App doesn't have
> any idea what it's bundle/package id is at runtime and we need that to hit
> an authentication server API.
>
> I've poked around the docs and searched the web and am coming up empty
> handed. Just hoped I could save some time.
>
> Thanks!
>
> Erik
>
>