MvvmCross Reachability on Windows Phone - windows-phone

I'm trying to use Cirrious.MvvmCross.Plugins.Network.Reachability on Windows Phone 8. I have added the Network Plugin to my WP8 project and my core. The plugin bootstrapper has been added to the Bootstrap folder. I'm trying to pass an IMvxReachability in the constructor of one the dependencies of my View Model. When I run the app, I get this exception..
Failed to load ViewModel for type MyNamespace.MyViewModel from locator MvxDefaultViewModelLocator

Not all plugins and not all interfaces are available on all platforms.
Reachability was added to iOS because it was a requirement from the App Store.
The same interface is not currently available on any other platforms.
If you need to get hold of the implementation of an interface which might not always be available, then the ways to do this currently are using:
if (Mvx.CanResolve<T>())
myT = Mvx.Resolve<T>();
or (better):
Mvx.TryResolve<T>(out myT);
There is currently an open issue (feature request) to allow optional parameters for IoC construction - see https://github.com/slodge/MvvmCross/issues/239
There are currently no open requests for Reachability - native APIs do exist (sometimes with app-capability protection flags), but most Droid and Windows apps don't test for network state...

Related

iOS: staic framework and dynamic framework?

Recently, I decide to make a framework for login module. I add the image resources to the framework, but I could not get it by code. I change the build the setting. mach-o type static library into dynamic library. I can get the image.
It is easier to make a moudle with dynamic framework than static framework.
but I google and find the dynamic framework made by developer is different with the Apple's dynamic framework. the app contain custom dynamic framework can not upload to Appstore ? Is it true?
who can answer my question? Thank you so much!!!
Dynamic frameworks are extremely common in AppStore apps. What you're probably seeing in posts is that you cannot manually load frameworks at runtime on iOS (i.e. there's no access to dlopen). They all have to be loaded at link time. You also cannot ship "shared" frameworks, where multiple apps share a single copy (like Apple's system frameworks). Each app must contain all of its custom frameworks.
But you can certainly ship dynamic frameworks in your bundle.

Call legacy Win32 API from C++/Winrt UWP app

Is it possible call a legacy Win32 API from a UWP app written using C++/WinRT? I'm trying to call a legacy API from BluetoothApis.h.
Is this possible? App is a pure desktop app. Tks.
The only Win32 APIs that are supported from a UWP app are listed here.
All other Win32 legacy APIs are not available, which means:
The WINAPI_FAMILY_PARTITION macros in the headers won't define the declaration for those unsupported functions, so use of them will result in a compile-time error.
If you tried to use one of those legacy Win32 APIs anyway, then when you submitted to the Windows Store the WACK tool would detect it and fail the application.
If you try to run the unsupported UWP app on some other Device Family than Desktop (i.e. Xbox One), those legacy Win32 imports will likely be missing.
If you misconfigure the WINAPI_FAMILY macro or locally declare unsupported functions, only-side load because you never try to submit to the Store, and only attempt to run it on a Desktop PC, then the function may or may not work anyhow. It depends on how the Win32 legacy function reacts to the restricted ACLs of the AppContainer process context that all UWPs run in.
TL;DR: No, you can't use BluetoothAPis.h in a UWP app
#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
.. all functions and types in BluetoothApis.h are here...
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
#pragma endregion

Communication between Petrel and standalone app packaged as plugin

We (our team) saw that it's possible to include standalone app to a plugin. The app is used to modify Petrel's data in the specific way. See for example these plugins:
http://www.ocean.slb.com/Pages/Product.aspx?category=petrelgeophysics%28Petrel%29&cat=Petrel&pid=PCPT-B1%28Base%29&view=grid
http://www.ocean.slb.com/Pages/Product.aspx?category=petrelgeophysics%28Petrel%29&cat=Petrel&pid=PRPW-B1%28Base%29&view=grid
We want to do the same thing so there are questions:
How the plugin perform editing Petrel's data?
Does Petrel (Ocean) provide any mechanisms for IPC or should we develop our own architecture for communications between managed plugin code and native app process?
For most Petrel data, it is only safe to modify them inside the main thread of a Petrel plug-in.
If you already have a native process that does the number crunching, you will need to implement your own way to share the data between the plug-in and the native process. Eclipse does this by file sharing. If the overhead of IPC outweigh the actual computation, you may want to consider refactoring the native process to make it run inside the plug-in.

Calling into an AIR Native Extensions from an Actionscript Worker

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.

Is there any tool to generate Object Graph on iOS app runtime?

I know there are Class Model tools (OmniGraffle, Doxygen) to generate Class model diagrams from the existing Xcode projects. But i'm looking for a tool which generates Object Graph on running iOS app in Simulator or Device.
You may be interested in
ObjectGraph-Xcode
objc_dep
I would recommend to use KSHObjcUML here.
It creates a nice interactive dependency graph to analyze in your browser.
Easiest to install with Alcatrazhere, a plugin package manager for Xcode 7. It is as easy to install plugins as it is to click a green button. And it does even support ObjectGraph-Xcode too.