AIR how to prevent application descriptor file from reverting or updating on launch - air

I have a desktop application using NativeProcess and I need the follwoing in the descriptor file.
<supportedProfiles>extendedDesktop desktop</supportedProfiles>
Unfortunately the file keeps reverting to (desktop first)
<supportedProfiles>desktop extendedDesktop </supportedProfiles>
How do I prevent this?
I'm using Flash Builder to launch though compiling using the Flash IDE.

Flash CS is rewriting the list based on the order of the checkboxes in the AIR Settings window. Changing the order of the profiles in the Descriptor.3.x.xsd file won't help. You could set the app.xml file to read-only, as long you don't have to make any other changes. Not a great solution...

Related

Programmatically install extensions on Safari 8 OSX 10.10

I'm trying to fix a couple of bugs for SafariDriver/Selenium.
Here is the problem:
On Safari 7 and bellow, to install a new plug in all you had to do is put the extension into ~/Library/Safari/Extensions. Next all you have to do is activate the plugin by adding it to the ~/Library/Safari/Extensions/Extensions.plist after this the Safari will have the plugin installed.
Starting with 10.10, this is no longer possible to do. The location of the extension is the same but i'm not sure how to activate the extension, since the Extensions.plist no longer exists.
My understanding is that there is some file that is controlled via "Safari Extensions List" password in the keychain under login but I have no idea which file this may apply to.
If I compile and install the extention by hand, everything works just fine but the automatic installation of the latest plugin is broken. (documentation for this https://code.google.com/p/selenium/wiki/SafariDriverInternals)
"Safari Extensions List" password is not password actually but a binary plist same as ~/Library/Safari/Extensions/Extensions.plist
Read it, modify it, write it back.
The correct thing to do is to have the user install the extension by opening it manually (double-click or command o). That's what Apple is trying to get you to do.
Apple never really wanted anybody messing about with plists for other apps.
Most preferences plists are cached in memory anyway and would require a new login session to blow them away and get new copies.
plists are updated on ending the session or the app in question.
They were never intended as a means to modify another app's behavior. That is a security risk.
In the case of Selenium, the intent is clearly to create an automated test environment. Setting up a nice installer pre-empts that to some degree.
The right thing to do is to file a bug with Apple letting them know what kind of functionality you need in Safari.

Preserve an external legacy apps file resource fork when including in an Xcode archive

I have created a cocoa application primarily to run on OS 10.6.8. to convert certain types of proprietary legacy files. The app looks at the legacy files creator code and processes it accordingly if it is a known type. Once the file is identified, I call an external legacy app (which I have added to the project) using [NSWorkspace openFile: withApplication: ]to open the droplet and process the file conversion.
The application works just like it is supposed to until I archive it and try to run it from the application bundle. Actually, it will continue to work but it is using the converter app from the project. If I delete the converter in the project area, then the app in the app bundle can not open the external app in that location. One work around is to delete the external app from the bundle after its archived and replace it with a copy of the one in the project area.
I would appreciate any suggestions on resolving this. I'm not sure if the problem is in some Xcode build setting I can change to include an external apps resource fork when archiving, or if this is a launch services issue with apps hidden in packages, or , something I'm not even considering.
Thanks
Mike
Try setting the "Preserves HFS Data" (COPYING_PRESERVES_HFS_DATA) build setting.

Cocoa application reinstall

I would like to detect if my application was "reinstalled".
Currently my application install means only a copy to the /Applications folder.
I would like to detect if somebody deleted the application and after a time he installed it again.
Do you have any ideas how can this be solved?
I would like to detect if somebody deleted
You can use FNSubscribeByPath(Deprecated in OS X v10.8.) for watching trash folder.
I would like to detect if my application was "reinstalled"
You can create one file in application support (your application folder) folder and refer that file. Write application version number in that file.
Your app is just a folder on HDD/SSD, so user can manipulate it like usual file. User can put your app in ~/Applications/MyStuff, make 300 copies of your app and launch them at once.
The only thing you can check is the bundle version of app. Read version from user defaults (written by previous app lauch) and compare to your own bundle version. This may be useful for updates to detect which resources can be upgraded or created.
How about checking for an existing preferences file or expected user defaults setting?
That would give you some hint it was installed recently - few people clean up their preferences folder.

How can we speed-up flash builder debug launch.. other than heapsize change?

Is there any configuration or method by which we can speedup debug or launch of application.. i have machine with 4 GB RAM, core i-7 processor. still it launches application from flash builder in 4 minutes.
uncheck all the validators.. it will speed up the build process :)
I have another optimization.
Probably you don't depend on the design mode.
So here is a simple trick which you can use to speed up the Flash Builder.
Open the default sdk folder which you are using.
(By default it's located /Applications/Adobe Flash Builder 4.5/sdks/{the default sdk 4.5.0} for Mac OS similar for windows (C:\Program Files\Adobe Flash Builder 4.5\sdks{the default sdk 4.5.0})
Then edit the file with name flex-sdk-description.xml
Just change the value of the version tag to something like this 4.10.0 :)
Save the file and restart the Flash Builder.
After this change the builder will not use the design view.
"Design View not Supported - incompatible SDK version"
If you want to use it again just put the correct value i.e. 4.5.0 (Should be the same as the name of the folder in which is located the file).
Best,
Emil
Here are more things that you can do to improve your (IDE) Eclipse/ Flex Builder
http://www.redcodelabs.com/2012/03/eclipse-speed-up-flashbuilder/
Modify eclipse.ini
Create a ram disk(virtual disk) on memory,..
Disable unneeded validators
etc...

Launch installed air application from browser for register file type

I have an air application register for a special filetype .part. After manual installation If I double click on a .part file it opened our air application and invoke the events perfectly. But if I am downloading the same file type from browser it doesn't show our air application as a default application to open with.
I also have this code in the descriptor file
<allowBrowserInvocation>true</allowBrowserInvocation>;
Any help is appreciated
Thanks
--
Fixed that. The problem was the extension of file I was using.
Fixed that. The problem was the extension of file I was using.