Calling into an AIR Native Extensions from an Actionscript Worker - air

I'm currently trying to push off some time consuming tasks to an actionscript worker. This worker will in turn needs to call out to an AIR Native Extension as part of it's processing.
I've tried various combination in Flash Builder 4.7 i.e. embedded worker and external worker (with explicit packaging of the ANE in the external worker project) but alas I've been unable to get this to setup to work. I keep getting an error from the worker saying that the native extesion class could not be found (Error #1014).
Does anyone know if it is at all possible to do this or it's a limitation of Actionscript workers?

I'm guessing this might be a bit late now, but I've just been having this problem myself, and it was caused by the ANE not being packaged with the app when it's sent to the device / simulator.
Classes within the NE weren't being found at runtime, but were accessible in Flash Builder.
It turned out that by default the .ANE file wasn't copied to the device.
To fix this, change the following project property:
ActionScript Build Packaging -> Apple iOS -> Native Extensions -> Check 'Package' for the ANE
No idea why it wasn't included by default. When you uncheck 'Package' you get a warning telling you that it may cause runtime issues!
Hope this is of use for somebody.

Related

Can't run xctest on macOS app - couldn’t be loaded because it is damaged or missing necessary resources

Please do help me on this scenario. I saw several post related to this, but could not able to resolve the issue with my mac App without pods.
Project is several years old, developed in macOS(Objective C). Now I am trying with XCTest for unit testing. Using Xcode 7.3.1, I am not able to run tests classes.
This project is to create frame work. Project is working fine, only issue is with the testing. We are not supposed to do Pods or some other alternatives.
Console window shows below points:
xctest[35530:345970] The bundle “BaseLibTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle. xctest[35530:345970]dlopen_preflight(/Users/12345678/Documents/Modify/Cocoa/Projects/BaseLib/build/Debug/BaseLibTests.xctest/Contents/MacOS/BaseLibTests): Library not loaded: #executable_path/../Frameworks/FreeTDS.framework/Versions/A/FreeTDS
Referenced from: /Users/12345678/Documents/Modify/Cocoa/Projects/BaseLib/build/Debug/BaseLib.framework/Versions/Current/BaseLib
Reason: no suitable image found. Did find:
/Library/Frameworks/FreeTDS.framework/Versions/A/FreeTDS: no matching architecture in universal wrapper)
Program ended with exit code: 82
#Anand For the 3rd Point: Please check the build settings.
Please make sure its either set to Standard Architectures (64-bit Intel) (x86_64) - $(ARCHS_STANDARD) or set to represent proper architectures.
To debug this more, could you please copy paste the exact error you are facing and share the build env variables?

Is there any DSYM file for .framework (besides app)?

I am a new guy in OC programming. Now I am involved in a framework development project.
I know the framework works as a library, which contains a group of methods. It's not an application that can run on devices.
Actually, our framework will work with customer's application. We want to investigate what happened inside our framework when customer's application crashed. So I want the 'DSYM' file of our framework, instead of an application.
As far as I know any iOS application does have corresponded 'DSYM', but I didn't find the 'DSYM' of our framework.
Does iOS framework project have 'DSYM'? If it does have, how can I obtain it?
By the way, I am using Xcode 8.1.
Thanks!
According to my observations, .dSYM files are generated for iOS dynamic framework built with Release configuration only.
After build succeeds, the debug symbols files can be found at these paths, for a device and simulator, respectively:
<Build_Root>/build/Release-iphoneos/<Product_Name>.framework.dSYM
<Build_Root>/build/Release-iphonesimulator/<Product_Name>.framework.dSYM
, where
<Build_Root> is usually a subdirectory within Derived Data directory;
<Product_Name>is the name of your framework.
Yes, you can generate dSYMs for dynamic frameworks. There are a few relevant build settings that control whether and where these files are generated:
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym,
DWARF_DSYM_FOLDER_PATH = "$(CONFIGURATION_BUILD_DIR)",
DWARF_DSYM_FILE_NAME = "$(PRODUCT_NAME).dSYM"
Obviously, you can set these to whatever you want, either in your project's build settings in Xcode (the project.pbxproj file) or as arguments to xcodebuild (depending on how you generate your framework).
DSYM (Debugging SYMbols) files generally store the debugging symbols for your app. And if app crash any where symbols replaced with appropriate method name so that it could help developer in a readable form. And for that you can use the crash log and they can be find in the iPhone where the app is installed. Each app and device have their own crash log.
Also please check this link it might help you.
Read Crash Report
Upload Symbols for iOS Framework
Hopefully these might help you or guide in the right direction.

IBM MobileFirst Plugin should use a background thread

I am using IBM's MobileFirst Platform Foundation (6.3.0.00-20150130-1638) to build an Android and iOS application. The application (iOS at this moment) gives quite a lot of information when running. But one is quite common and I think it is also quite dangerous. The error I get is:
THREAD WARNING: ['WLApp'] took '11.354004' ms. Plugin should use a background thread.
This is for WLApp, but for more plugins like DeviceAuth (111.884766 ms), UserAuth (19.232910 ms), another DeviceAuth (47.208984 ms) and more.
Is there a way to run plugins on the background, and so, how can I achieve this?
Another question is if I can and how to hide the Debug notifications?
These warnings come from cordova plugins, and it is harmless, it just means that the code in the executing part of the cordova native plugin side, should be run in background.
We are intending on cleaning these warnings out.
look at: http://docs.phonegap.com/en/4.0.0/guide_platforms_ios_plugin.md.html#iOS%20Plugins
You cannot do this on your own with the supplied plug-ins.
These warnings are issued by iOS but are harmless.
We'll take a look, but this is harmless, unless you actually see a real problem (which I doubt right now that you do).

Can't use background task in Windows Phone 8.1 (the ID_CAP_NETWORKING required, but it's included in the manifest)

I need to update my Windows Phone application tile by downloading and parsing JSON. So I'm using Microsoft HTTP Client Libraries.
And I've always got the exception Use of networking APIs requires the ID_CAP_NETWORKING capability to be defined in the application manifest when I'm trying to debug background task.
But my manifest included ID_CAP_NETWORKING as required (screenshot https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-xaf1/t31.0-8/10750111_821340111262044_6461333323674658178_o.jpg).
I don't know what to do. I tried rebuild or recreate the app, but this didn't help. Also I can't find any documentation or an answer on the internet.
Can you please write, what can I do to solve this problem?
This is demo project http://1drv.ms/1yjHm49 with reproduced problem (project's name is 'Meduza. Windows Phone').
I debug my application on Lumia 720 (if it can help).
I re-downloaded your project and now I get your error. So I thought, I must of done something before launching your project that fixed it.
It took me while, but I can get your project to work by doing this
Unzip project to directory
Open Project
Clean Project
Add Internet (Client and Server) in Package.appxmanifest file (make sure you save it before exiting)
Put the break points in your background task
And it works. So a combination of Clean Build + editing the Package.appxmanifest did the trick for me.

Embedding mono - "Fatal error in GC": "Too many root sets"

I'm embedding mono in C++ application, and I'm linking it via dll library, which is then loaded into application via LoadLibrary.
When the application starts and the dll runtime linking happens, the mono runtime seems to fail to initialize itself with "Too many root sets" message. I'm unsure when and how the runtime itself is initialized (I thought it happens on mono_jit_init, but the error pops up before any call to any of the mono functions. It occurs exactly at LoadLibrary should I try load it manually instead of relying on mono.lib import library).
I succesfuly embedded it in standalone application, so I assume it is something specific to the way my dll is loaded by the application, but I don't know what exactly.
Any clues?
This may be a limitation of the way the Boehm GC works in windows: it hooks to the operating system at LoadLibrary time to get notifications of the created threads and loaded libraries (this is why you get the issue at LoadLibrary() time and not on mono_jit_init()).
Or it may be that you have really many threads and libraries loaded by the time the GC is initialized. If you link the app to mono directly, does the problem go away? If yes, that should be your current workaround.
In the future (or if building mono from git) you may be able to use the SGen GC which shouldn't suffer from this problem.