asset library (swc) does not reflect changes in flash project in fb - flash-builder

I have created gui related components in flash professional and exported the swc and added this swc into my referenced libraries (by adding link to the swc) and I can create/reference to the symbols in my flash builder project.
Every thing is fine untill I modify something(MC) and export the swc the changes won't reflect immediately. This is somewhat understood, so I just use to restart FB so that the changes are reflected. This was working find until yesterday.
After making changes to symbols, nothing will reflect the changes
I restart the FB (which use to work till yesterday)
Refresh project, referenced libraries
Clear browser cache
Clean the project
I left home with frustration and today morning when I restarted the system it got reflected the changes. And now I did changes to the gui again and its the same problem.
I know there is one easy way which is to remove and add the swc reference from the project
I am pretty sure there could be much easy simple way to do it.

The compiler cache can sometimes not pick changes in SWC libraries (old known issue).
Solution, when you think this problem happens, is to "clean" the project. Both FlashBuilder and FlashDevelop let you clean the project from the Project main menu.

Related

How to obtain copy of Starling without errors OR how to fix Starling errors

I set up my development environment to learn Starling today. I watched the video at Starling Tutorial Video 1 on YouTube, and I followed the steps. Toward the end of the video, the presenter notes that I should make sure there are no errors and run my program.
The assumption is that "make sure there are no errors" applies to the code that we have just written. I have no errors in the two files that I created along with the video instructor. However, I have 54 errors that exist within the newly installed Starling framework, which I am not yet experienced enough to debug and correct (see image).
The package that I installed for Starling is the latest release available from their website on the main page. I am using Flash Builder as recommended by their tutorial, and, clearly Flash has been advanced several generations since the tutorial was first created.
Is there a place where I can download a copy of Starling that has been upgraded to match the current version of flash and uses the correct ActiveScript 3 syntax?
Alternatively, are there any recommendations for bypassing or overlooking errors in a code base that is not mine to maintain?
Any help provided is appreciated. The screenshot below shows the 54 errors in the Starling packages.
Note: Most of the errors seem to regard Context3D objects. And I believe all instances of the errors regard "possibly undefined methods" being used, or an "possibly undefined property" being accessed.
Found some helpful resources:
Bulletin Board Discussion
Instructions for Installing Air SDK that are better than the YouTube video
I had to install the playerglobal.swc files and Air SDK multiple times. Eventually, I deleted all 11.1 folders to remove any potential conflicts.
On the last attempt to recreate the project, I noticed that the swc files were being loaded from the eclipse folder. The playerglobal.swc file was updated there, because I replaced ALL playerglobal.swc files. However, this copy of the Air SDK was not the latest release that I had installed.
I carefully matched each file loaded in the eclipse folder to the corresponding files in the '4.6.0 air 3.4' folder.
Once I did this, the compiler errors went away. Now I am getting ReferenceErrors during the build process, but that is a separate issue and unrelated to the above question.
Advice to those who follow:
Make sure, when you create your new Action Script project, that you load the swc files from the 4.6.0 folder or the 4.6.0 folder that you merged with the AIR SDK.
Save yourself some time and reduce risk of errors by using the ditto command to merge the AIR SDK into the 4.6.0 folder.
If you are still having trouble, delete references to old code-base versions to prevent any chance of accidental references being used.

Flash Builder 4.7 corrupt workspaces

On OS 10.8.2 and using the latest Flash Builder 4.7 it seems I can't go for more than a few days before running into compile errors.
90% of the time these have something to do with my workspace becoming corrupt.
Simple to fix, BUT, a pain having to reapply ALL my settings, plugins etc every time I create a NEW workspace.
Can anyone suggest any way(s) of avoiding workspaces from becoming corrupt?
Great question, I really hope someone can answer it. In the meantime, I found a way to recover from crashes without needing to rebuild all the project configuration etc which is so tedious. This is on OSX 10.8.4, Flash Builder 4.5, hopefully it works for FB 4.7 too...
Ensure FB is closed
Move all the project files out of the {workspace_fb}.metadata/.plugins/org.eclipse.core.resources/.projects folder.
Start FB then close it again.
Move projects folders back in to the .projects folder.
Start FB.

Third-Party Code and Git

When developing iOS applications, I frequently use third-party code from GitHub and reusable classes I created myself. What I have been doing is cloning the source code into a specific folder somewhere in ~/Documents, where I kept all the library code. Then I would drag the source files into the Xcode project and code away, with a local Git repository keeping track of the changes in my own source code. So far so good, but I recently found a severe problem: I wanted to switch back to a older version of my Xcode project and found that it did not compile anymore because it used an older version of the third-party code, and nowhere had I stored which version it used!
How is this problem usually solved? I have looked briefly into Git submodules, but I'm not sure if it's the right thing. I also briefly read about CocoaPods, but could I also use that for libraries I created myself?
It is actually solved with git submodule: the idea is to reference an exact commit for each submodule you need, allowing you to go back in the history, and find the coherent set of commits you need for your project to compile then.
(More in this answer)
However, that does require a slight change in your working tree structure, since each submodule would become sub-directories of the parent repo which represents your project.
Note also that it (git submodule) is useful for source dependencies.
CocoaPods would be more for building the binaries you depend on (binary dependency).

How do i prevent Xcode from overwriting iTunes binary?

I have a really annoying problem. My app is published in the AppStore.
Everytime i run the app from Xcode, the iTunes binary just gets overwritten... and next time i need to test something with the production version of the app, i need to re-download it.
Is there any way to solve this?
Thanks in advance!
You need to change your bundle identifier. Here's how I set it up in my projects
Select your Project
Select your target
Navigate to the Info tab
Change the bundle identifier to a custom build setting e.g. I have it as ${BUNDLE_IDENTIFIER}
Now click on Project - (you may wish to keep at target level your choice)
Navigate to the Build Settings tab
Scroll all the way to the bottom to see User-Defined
Click Add Build Setting
(1) Select Add User-Defined Setting
(2) Add Key as the name you chose earlier
Set a different bundle identifier for each scheme
Bonus
You can use the same trick for icons so you can easily tell apart your builds on one device
Changing the bundle identifier, as Paul.s suggested, works — but it means your Release and Debug builds will diverge. Technically they will be different apps that use different containers. There can be good reasons to do this, but it has it's risks too: it's a bit more complicated, and you usually have to work a little harder to make sure you test that the development version properly handles data from the production version. You'll want to make sure any ad hoc builds you send to testers use the production bundle identifier.
Another way to approach the problem is to streamline installing the old version. If you Archive your production builds, then you can install them without downloading them again through the App Store. Just open-up a previously exported IPA and sync.

How to enable hot swap in intelliJ

I want to work on intelliJ on my webapps and I don't know how to hot swap code while working.
For example while I was working in Eclipse when I edited jsp files Eclipse automatically, instantly swapped the file so when I refreshed the page my changes were there
When I change class code in Eclipse it worked a bit longer because he republished the app but did it automatically and instantly.
I saw that intelliJ in the runtime configuration has an option 'how class swap'. I did check it but nothing is happening. I had tried compile, make, save and everything else and nothing is happening. I had to reload the app and I had to do dis manually. Secondly intelliJ reloads EVERY application in my webapp directory. I have them a lot so it taking ages. how can I turn on hot swap?
Hotswap only works in debug mode. So you need to connect to your webserver through a debug configuration. Then, after compile either the project or at least the class with the modifications, IntelliJ tries to hotswap that class.
This only works for minor changes. For example, creating new methods on the fly is not possible using this way.
Hotswap works with exploded artifacts on Update action. If it doesn't work with your project, contact support for help and provide the project to reproduce it.