I'm making simple react-native app. Android version works fine (already on Google Play).
Windows version is also working but It cannot pass through certification kit app.
I've made release-bundle build according documentation:
https://github.com/Microsoft/react-native-windows/blob/master/docs/RunningOnDeviceWindows.md
App certification kit return errors:
Type ReactNativeWebViewBridge.MessagePostedEventArgs in file ReactNativeWebViewBridge.winmd is not sealed and does not have the ComposableAttribute. Unsealed types must have ComposableAttribute.
and
API getenv in api-ms-win-crt-environment-l1-1-0.dll is not supported for this application type. ImagePipelineNative.dll calls this API.
Built with Visual Studio 2017.
Am I missing something?
Thanks for any help!
Type ReactNativeWebViewBridge.MessagePostedEventArgs in file ReactNativeWebViewBridge.winmd is not sealed and does not have the ComposableAttribute. Unsealed types must have ComposableAttribute.
The error message has explained clearly. You need to use sealed modifier to the MessagePostedEventArgs class in ReactNativeWebViewBridge. If you didn't use sealed, you need to use ComposableAttribute. More information about ComposableAttribute, you could refer to James McNellis's answer in this thread:What is the ComposableAttribute in WinRT?
API getenv in api-ms-win-crt-environment-l1-1-0.dll is not supported for this application type. ImagePipelineNative.dll calls this API.
This error meant that ImagePipelineNative.dll calls some unsupported APIs in UWP. You need to create an issue in react-native's repository.
Related
I developed a Xamarin Cross Platform application that is working perfectly on Windows but when I try to recompile for Android I get the following error:
Can not resolve reference: `Windows.Foundation.UniversalApiContract
I use the Windows.Foundation.UniversalApiContract reference because of the Windows.Storage class (generate files in internal memory).
I understand that I may have to change the recording method on Android but I can't even get to that stage...
How do I resolve this situation?
Just as ToolmakerSteve said, Windows namespace relies on features that exist only in Windows. The reference should not be in the main .Net Standard library but in the UWP Application.
First, you can move the code to the Windows folder or set the #if Windows around it.
Second, you can write the code for each platform. I found the answer you can refer to Can not resolve reference: Windows.Foundation.UniversalApiContract in Android Application.
I saw that the MIP SDK 1.7.133 now has support for .NET Core, and I'm trying to implement Microsoft Information Protection SDK in an Azure Function using .NET Core to label documents in SharePoint (by downloading, labeling and uploading the document again), but when calling MIP.Initialize(MipComponent.File) I'm getting the error below.
Executed 'SensitivityLabeling' (Failed, Id=591fade7-7c51-40b6-b723-56b68af3a66d, Duration=572ms)
System.Private.CoreLib: Exception while executing function: SensitivityLabeling. Microsoft.InformationProtection: LoadLibrary failed for: [F:\<verified-path-to-function>\SensitivityLabelingFunction\bin\Debug\netcoreapp3.1\x64\mip_dotnet.dll].
I followed the quick-start guide before the update which worked well, but when I now update the SDK in the same project and run it with version 1.7.133 it crashes on the same command as my new Azure Function project.
I tried both the plain overload above and with the path using the below example from another question, verifying that the path is correct while debugging, but with the same error.
var path = Path.Combine(
Directory.GetParent(Path.GetDirectoryName(newUri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath)).FullName,
Environment.Is64BitProcess ? "bin\\x64" : "bin\\x86");
//Initialize Wrapper for File API operations
MIP.Initialize(MipComponent.File, path);
Another semi-related question, is there any other way to label a specific document in SharePoint using code except for the MIP SDK? No other API seems to support applying labels, only changing the actual label settings.
Running it in release mode with version 1.7.133 instead according to Microsoft information protection SDK 1.7.133 - Load library failed issue error seems to work.
As the documentation suggests:
The Android packages are available in the JavaScript/TypeScript global context and are the entry point for accessing Android APIs. Think of them as of TypeScript/C# namespaces, or the way to access sets of classes. For example, the android.view package grants access to classes like android.view.View - the base of all view elements in Android.
But when I try to access any package it gives me following error:
Error: Cannot find name 'android'
I don't know what is wrong here maybe the documentation is outdated or I am missing something. If you know that please let me know please let me know I can solve this problem.
When working with TypeScript (and even with plain JavaScript if you want intelliSense for the native APIs) you need to have explicit declarations (usually coming from typings files with *.d.ts extension). From the same documentation article, you have referred
Note: To have access and Intellisense for the native APIs with
NativeScript + TypeScript or NativeScript + Angular projects, you have
to add a dev dependency to tns-platform-declarations. More details
about accessing native APIs with TypeScript can be found here.
Detailed instructions for how to use tns-platform-declarations can also be found here or in the plugin's instructions
I am working with Parse.com whilst building an app with Xamarin for iOS. I have built an Android version with no issues, everything working. However, when I try to register a Custom Parse Object before initializing Parse.com client I have an issue where I can't actually register objects.
As you can see my Parse iOS project is trying to reference the Parse Android library. I have no idea why?
Has anybody else seen this or know if I am registering these classes incorrectly?
Okay so managed to figure this one out.
As I have a shared code library for both Android and iOS that references the Parse library, I needed to make sure that the shared code library references the Parse version of the platform I was working on.
For example, whilst building my Android application the shared code library that referenced Parse objects needed to reference the Parse.Android library.
When moving to iOS part of the project I made sure my shared code library referenced the Parse.iOS library.
Hope this makes sense to anyone out there.
The Apple Extension guidance has this document on Using an embedded framework to share code
I want to share code between my Extension, and the hosting application. How do I implement the following within an Xamarin app:
Require Only App-Extension-Safe API
You must choose “Frameworks” as the destination for your embedded framework in the Copy Files build phase.
Require Only App-Extension-Safe API
Currently there is nothing in the code review/analysis or compile phase within Xamarin.iOS that will warn or prevent APIs that are not allowed within Extensions,
i.e. There are TODO notes within the healthkit.cs:
// FIXME NS_EXTENSION_UNAVAILABLE("Not available to extensions") ;
It currently is up to the C# developer to follow Apple's Guidelines. Obviously the following would cause an app to be rejected if this was within Extension code:
var a = UIKit.UIApplication.SharedApplication;
But the Some APIs Are Unavailable to App Extensions list provided by Apple is fairly concise on what is not allowed:
Understand How an App Extension Works
Personally For code sharing purposes I add a compiler directive to my Extension projects to conditional compile code that I need to remove... ("NS_EXTENSION_UNAVAILABLE_IOS", just like what is available in ObjC/Swift Extension projects)