Flash as3 ios: error #2007: parameter possible symbol clash in multiple swfs, abc env must be non-null - ios

I'm developing an app for iOs using flash air, version 3.8, this version allow me to load a externals swf with assets, flash professional cs6 and flash builder 4.7
I have some kind of lobby where the user select a differents games. If I deploy the app just with 1 game (1 swf), I would loaded a game without problem
But, If I deploy the app with other games, I would just loaded 1 of them swf, but the other games give me this error:
error #2007: parameter possible symbol clash in multiple swfs, abc env must be non-null
The parameter abcenv doesn't exist in my code.
Thanks in advance

I have found exactly the same issue it also happens with AIR 3.9 You can only do this by embedding the game logic into your main menu and constructing classes as you need to. I know this makes the initial part of say your menu heavier.
You can however load in swfs as library assets, if you need this. I think the bug has to do with swfs and a restriction of overlapping classes and the fact that you can only use one Application Domain. But this is my best guess on the underlying restriction with this. If you do find a work around let us know.

I encountered this error and solved it today. After Google I found nothing can help. Now maybe I'm the only person that solved the problem easily. This is my story:
Working on a AIR actionscript mobile project.
In ad-hoc package for iOS, loading multiple SWF files successfully, except two. Those two cause the "Error #2007: parameter possible symbol clash ......" error.
Found there is a very small difference between the normal SWF and the error one: in the error SWF, one MovieClip is 3D transformed, I saw there are three 3D axis above the MovieClip. Then I deleted the MovieClip from stage and Library and replaced with a new one. Problem solved.
Note that I didn't re-name anything, or delete any duplicated things. In fact there are many duplicated things (image file with same name, and MovieClip copied between the SWFs) in the SWF files.

I ran into this same issue. The issue is that AIR for iOS has to compile ALL of the external .swfs together, so if there are naming conflicts, that can cause trouble. This especially seems to be a problem if two or more of the .swfs were made from the same cloned .fla, even if one of the files had changes made to it.
In my case, it turned out that there were several unused earlier versions of .swfs in the folder of .swfs to be loaded (such as external_movie-prev.swf). I was able to solve the problem quite easily just by deleting these extra files.
This is a common technique in development, just to rename a previous version of a file and add in a new version to the folder for testing. In normal software development these extraneous versions do no harm. But in the case of AIR for iOS, this situation can cause your app to inexplicably freeze when you try to go a movie that also has an unused previous version in your assets folder. This took me several hours to chase down, so I hope it helps someone else.

Related

Transferring Xcode Project from one computer to another brings random errors?

I have a Xcode project I got from another developer. Initially when I opened it it has a bunch of errors (most of which were un-updated frameworks). I got it to work after a while and I fixed it. I want pass it back to the manager since I'm leaving uni in a few months. I copied it over to my friends Mac to see what would happen if I just took the project and all it's folders and made it a zipfile. It didn't work for some reason. It gave me an error:
error: using bridging headers with framework targets is unsupported
But why did that come up? I mean it's the same code on the slightly different versions of Xcode (13.1 versos 14.1) but I doubt there was a massive change between the two that would cause this. I want to be able to pass these app later in the future without having to care about this stuff. I made a GitHub (link below) would cloning that work? Also the laptop I chose was just a fresh reset. Would it be due to not having coco-pods installed?
I feel like I could go through and fix it all on that laptop and document that but then I'm afraid that every time I put it on a new one it would come up with random errors every single time making my documentation moot.
https://github.com/AbdullahMSaid/SonicExperiment-Works
With big help this was Fixed.
Things that fixed it.
Having the correct version of Xcode
Turning everything from absolute path to relative
Lots of other code fixes. But those are my project specific.
You don't need bridging headers in framework. Use should have something like "YourFramework.h" where you can import your .h files.

Unity 3d model fragmented on mobile

I have a strange issue that keeps coming up in Unity 2018.2.15f1 (personal). The best way to describe it is that my 3D models are fragmenting (exploding? shattering?) when I build to iOS. So, I'll start with a visual explanation. This is what the model looks like on an iPad
and this is what it should look like (you can also see it on the App Store w/o fragmenting):
These models came from OSM terrain data, worked on in Blender, and then imported to Unity. They worked fine on mobile builds up until one of two things happened while trying to increase performance 1) I experimented with mobile shaders and 2) I followed some of the tips in this video. Since discovering the issue I "undid" all the changes (using Git this was easy) and it seemed to fix it, until many versions later the problem has suddenly showed up again, but only on this one model (not the other two "cities"). I assumed the issue was the switch to mobile shaders, but since I'm not using them any long I now have no idea what is causing the issue.
Here's what I've done to try to fix it:
Reimported the model
Broken the model into distinct components (buildings and terrain)
Double checked I have default Quality settings (under Project Settings)
Double checked I use only the Standard Unity shader throughout the game
I have found if I turn off one or the other of two models in the scene (the buildings and terrain) the issue goes away.
I have found if I position the building model so they don't intersect (see #5) it works sometimes but not every time. It must be at least 30 units above the terrain on the Y axis before the fragments go away.
I tried writing over the iOS build folder (instead of append) but that had no effect.
I tried switching to PC standalone, resetting the GI Cache in Preferences, and switching back to iOS but no luck.
I have found the a solution, but I don't know why. I separated the meshes into separate objects AND gave each a different material, with matching settings except for one option.
On the new one, I changed the Rendering Mode from Opaque to Transparent. Now there is no more fragmenting, but I'm not sure why. Leaving this question open until someone knows the answer.

Class GAD_GTMStringEncoding is implemented in both <framework> and <app>. One of the two will be used. Which one is undefined

I have an iOS project in Xcode. It contains a load of linked libraries including GoogleInteractiveMediaAds.framework as well as an internal player library that I believe is also linked against this framework. Both are also embedded binaries.
The project compiles just fine but at runtime I get the following error:
Class GAD_GTMStringEncoding is implemented in both
/GoogleInteractiveMediaAds.framework/GoogleInteractiveMediaAds
and APP_PATH. One of the two will be used. Which one is undefined.
On simulator the app works as expected every time despite this warning - I get the pre-roll, mid-roll and post-roll ads that I'm expecting. Every time. On device it's a different story with the ads sometimes working and sometimes not. I'm aware that the above issue results in different behaviour on different targets and I suspect this conflict is to blame for the broken functionality on devices.
Solutions I've found here on SO suggest either changing the namespaces or removing the linkage from either my app or the library that I'm linking against. The problem is, if I remove the embedded binary in my project then it fails to compile:
dyld: Library not loaded:
#rpath/GoogleInteractiveMediaAds.framework/GoogleInteractiveMediaAds
Referenced from: APP_PATH
Reason: image not found
(lldb)
I've seen a few people suggest what would be removing the linkage from the app and using the player's internal instance (where I then have to hope that the player is compiled against the version that I need), but how on earth do you do that? And would that even work in this case?
Also, is there a way to find out for sure where this other instance of GoogleInteractiveMediaAds.framework is coming from? I'm only assuming that it's inside the internal player library but I don't know for sure as I don't have the source. The error message just provides me with the path to the compiled app which is of little help since there's like 30 linked libraries inside it.
Thanks in advance.
After initially insisting that the issue was somewhere in our code, the Google team responsible for this framework were eventually forced to admit (after we provided a sample app) that it was a problem with their code and not ours. It was resolved in an update.

Pass app to Xcode

I've been running a Xcode project on my iPhone but I haven't upload the binary yet. The thing is that I've lost the code on my Mac (that's what happens when you don't commit con GitHub) and the only thing I still have from the project code is the "app" that the iPhone saved when I run it for the first time. Is there any way to pass the code from the iPhone or see the code?
No. Your code was compiled, linked and packaged to produce the application, and it is the resulting compiled binary that has been installed on your phone.
You may be able to retrieve resources (storyboards, XIBs, images, plists...). For the code, there may be decompilers (not sure if there are any for Objective-C or Swift, though), but they will not reproduce your original code, just code that compiles to the same thing (i.e. without comments, with arbitrary names for local and instance variables, etc.).
Don't you have a Time Machine backup of your project?

AS3 Multiple Application Domain using local null.swf file

I have the following issue, I cannot find a solution on the web, please let me know if you can help me or point me to a proper info about this issue.
To understand the background, Im porting a game from flashDevelop to Flash Builder (please dont give me tips about this comment if doesn't help to my particular problem). Everything works fine right now, the game use a file null.swf as a container of local files (I don't undertand that part completely, but the game has a lot of embed swc files, and the game use the null.swf to access those files, through LoaderMax).
The problem is that everything works fine with a fast build, but it's not working with a standard build, I have the error on Loader class that says "Multiple application domains are not supported on this operating system".
Useful information:
Im using AIR 3.9, compilation flash swf-version=20 (I had 18 when I started with this issue)
null.swf is properly included on the IPA, the code recognize the file, and as I said before it works with a fast build.
For embed swc files, I had to include the files with a compiler argument: "-include-libraries ../../filename.swc ../../filename2.swc etc.."
Thanks for any help.
Regards
It's fixed, using a context:
context = new LoaderContext(false, ApplicationDomain.currentDomain, null);
If I use the third parameter, like ..., SecurityDomain.currentDomain); it doesn't work.

Resources