Installing MvvmCross.Core in Xamarin.iOS Unified API - ios

I created a Unified API project, and installed combined PCL profile + NuGet 2.8.3 alpha installer according to this.
So, now my profile 78 now recognizes the Xamarin.iOS Unified project. But when, I'm trying to add the MvvmCross package in the project it is installing the MvvmCross.Core framework instead of the MvvmCross.Touch framework.
I also read here that the unified iOS mvvmcross touch is included in 3.2.2 beta1. So, in Package Manager Console I'm checking Include pre-release and installing the 3.2.2 beta1 but it still downloading the MvvmCross.Core framework.
Anyone knows what can be happening?
Thanks in regard,

MvvmCross 3.2.2-beta1 does not contain any assemblies that explicitly target the new Xamarin.iOS Unified target framework.
In order for MvvmCross to explicitly target Xamarin.iOS it would need a corresponding lib directory in its NuGet package. Looking at MvvmCross.HotTuna.CrossCore 3.2.2-beta1 on NuGet, for example, it has the following lib directories:
MonoAndroid
MonoTouch
net45
netcore45
portable-win+net45+wp8+win8+wpa81+MonoTouch+MonoAndroid
portable-win81+wpa81
win81
wp8
wpa81
This is missing a Xamarin.iOS10 directory and associated assemblies that target Xamarin.iOS Unified.
So the only assemblies that could possibly be used in a Xamarin.iOS Unified project are the PCL assemblies from the MvvmCross NuGet packages.
Looking at the pull request that is linked to by the blog post announcing support for Xamarin.iOS Unified they seem to have put support for Xamarin.iOS Unified into version 3.5 and not 3.2.2.

Related

Class Library (.NET Core) vs PCL in Xamarin

I am playing with .NET Standard and found strange that if I have the following project.json specified for both a .NET Core class library (xproj) and a Portable Class Library (csharp), only the latter can be properly referenced from a Xamarin.Android project:
{
"supports": {},
"dependencies": {
"NETStandard.Library": "1.6.0",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1"
},
"frameworks": {
"netstandard1.4": {}
}
}
I can add both as a reference, dotnet update works as expected (or at least no error messages shown), but the .NET core library is not realized:
type or namespace could not be found
I find this strange, since I'd expect any .NET standard targeting library to work properly. Am I doing something wrong or intentionally only PCLs are supported from Xamarin?
I assume you have a .csproj for the Xamarin.Android project and an .xproj for your .NET Core class library, which is targeting .NET Standard.
I believe the issue might be because of the different project systems we currently have and where each of them expects to find built assemblies for project references.
A workaround is to manually edit the .csproj to include the reference with the correct hint path. For example:
<Reference Include="SomeOtherClassLibrary">
<HintPath>..\SomeOtherClassLibrary\bin\$(Configuration)\netstandard1.6\SomeOtherClassLibrary.dll</HintPath>
</Reference>
You may also need to manually add a build dependency from the Xamarin.Android to the class library project to ensure the projects are built in the correct order (right click the Xamarin.Android project in Solution Explorer Build Dependencies > Project Dependencies...).
In summary, it's not that .NET Standard targeted libraries don't work with Xamarin, or that Xamarin only supports PCLs. It's a quirk with project references and the current state of the tooling, which I am sure will improve in time.

Android Annotations framework is not generating anything

I am trying to use Android annotations in Android studio.
In my libs folder in my project , I'm putting "androidannotations-api-3.3.2.jar"
(not using gradle for annotation library)
Thought ,there was not any compilation issue,I could not find the generated _ files for my Activity.
In AndroidMenifest.xml also
"MainActivity_" is not able to resolved.

Where to find worklight.plist?

I'm using this URL to implement the App authenticity for iOS.
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/authentication-security/application-authenticity-protection/application-authenticity-protection-native-ios/
However, I need to know where to find the worklight.plist to make sure that the applicationId is matching what i'm putting in the application-descriptor.xml.
The worklight.plist file is available only after building the MobileFirst application using the MobileFirst Studio Eclipse plug-in (or CLI commandline tool).
For Hybrid applications,
You can then find the worklight.plist file in the your-project\apps\your-app\iphone\native folder.
For Native applications,
You need to only generate the NativeAPI for iOS and it'll be located in the generated folder, in your-project\apps\your-nativeapi\WorklightAPI folder. You then need to follow the native apps tutorial to copy over this (and more) files to the Xcode project.
Thank you,
I have found it after building the project inside the native folder.

Xamarin Studio Starter: Why am I getting native library reference error on build without native libraries?

I've been playing around with the Starter Edition of Xamarin Studio to determine if it will meet my needs. I understand (so I thought) the limitations of this edition; 32K compiled IL limit, no native libraries, etc. Now, I understand native libraries to be C/C++ libraries, or even native Java libraries. This does not seem to be the case.
I have a solution in Xamarin Studio with 2 projects. One is an Android Class Library, the other is an Android Application. When I reference the class library from the application project and build, I get the following error.
Your app references native libraries. This functionality requires Indie Edition or higher.
I beg to differ! Every .cs file in the referenced Android class library project is simple .NET code. What am I missing? I can successfully run the Tasky Android_Starter solution without issue, and it is made up of 2 projects like mine.
I had to delete the Resources folder and manually edit the Android class library project file in order to get this working. I looked at the Tasky sample's project file as a reference.
After deleting the auto-included Resources folder from the project, edit the .csproj file in a text editor to remove the following XML elements:
Project\ProjectGroup\AndroidResgenFile
Project\ProjectGroup\AndroidResgenClass
With those things taken care of, I no longer get the error. I'm guessing, Xamarin Studio thought I was referencing another Android application instead of a class library. Not sure why the default project template includes things to break such a flow, but perhaps I'm not "doing" right" either. Go figure.
Deleting the Resources folder and manually editing the csproj file didn't work for me. I had to create a new C# Library project instead of creating an Android Library Project and import my .cs files into that. After that it compiled and ran fine.

Appcelerator: Trying to add a module to my project

Im trying to add a module to my project but once its added and i add my code to tiapp.xml, it will not build for ios. I get SystemExit: 65
In android it will build but crashes when it comes to the part that uses the module.
Titanium skd - 1.8.2
Xcode - 4.3
Running on Mac osx lion.
Yes, ive tried a clean rebuild. Ive also deleted the build folder and tried rebuilding that way. Im almost positive im including the module and my code correctly as ive read numerous tutorials and threads about how to do it.
To install the module i placed the .zip in my project root and let it install when it tries to build. It creates all the proper folders and places the files accordingly. Everything seems correct.
My TiApp.xml
<modules>
<module platform="iphone" version="1.0">com.zooz.ti</module>
<module platform="android" version="1.0">com.zooz.ti</module>
</modules>
Adding modules to titanium is a bit buggy and many small details needs to be correct, here are a few:
The module version is the right one and written correctly in tiapp.xml
Make sure that also the version that is inside the module manifest file matches the version you point to.
If you upgrade a module version, a clean build need to be executed.
Minimum SDK version - checkout that the module min titanium sdk version parameter has lower value then the SDK you use.
Regarding the specific ZooZ module. There is a new version much more stable and easier steps to integrate for iOS and Android. For iOS use version 1.2 and Android 1.1. In the new iOS version you don't need the extra step of modifying titanium default xcode project.

Resources