I created a vanilla PCL project in xamarin forms. I tried to run on Android and it works fine.
But when I change de target to IOS and select my real device (Ipad with IOS 11.4.1), Visual studio only allows me to build solution, I wanna to run application on it but I can't.
The target IOS is 8.0, and I already authenticated with my apple account and created a provisioning profile.
I already done this on another project before and works fine.
I really don't know why Visual Studio don't allow me to debug, when I open my oldest project with this device it allows me to debug.
What OS are you running Visual Studio on? IOS requires MAC, whereas Android is compatible with all OS. It's been a while, but I know there's an option to wirelessly connect to a MAC OS so that you can run your IOS Xamarin Forms application anywhere.
I found the solution.
I was trying to use "Debug", and it works fine on the emulator, but to real device I need to use "Debug | Iphone" or otherwise it only builds.
Even when I try to use "Release" it's the same trick.
Related
I have manually embedded the Google Sign In framework into an iOS app with the .bundle and .framework files.
After adding the Mac as deployment target with the most recent Xcode and macOS Catalina versions I get the following error message when trying to run the app on the Mac.
Building for Mac Catalyst, but the linked framework 'GoogleSignIn.framework' was built for iOS + iOS Simulator. You may need to restrict the platforms for which this framework should be linked in the target editor, or replace it with an XCFramework that supports both platforms.
Can I somehow fix this problem? Or do I have to wait for Google to release a new version of the framework that is compatible with both iOS and macOS?
If the framework is open source, you can open its Xcode project, enable Catalyst and recompile.
I'm working on a multi OS app in Xamarin Forms, for Android and iOS.
Everything's fine with android compilation and deploy, but it's not that easy on iOS.
Visual Studio still deploy the same version again and again, like it's stuck somewhere in past.
Is there a cache to clean somewhere? The iOS app is displaying labels which are no more in my code, so it's probably a cache issue.
I tryied to clean the whole solution, in vain.
I deploy on a macOS virtual machine, hosted with VMware workstation. VS and xcode are installed on it.
There is an example of same page displayed in ios and android..
I am having issue debugging Android project. I can deploy to device and run it, all works fine but if I try to debug, the app gets deployed to the device and very briefly opened, splash screen shows up but the app then closes.
I am using Xamarin Forms on Visual Studio 2015.
Device is running Android Oreo (8.0.0). Another device running Android 6.0.1 is debugging fine.
The output shows following:
InspectorDebugSession(11): StateChange: Start -> EntryPointBreakpointRegistered
InspectorDebugSession(11): Constructed
Android application is debugging.
InspectorDebugSession(11): HandleTargetEvent: TargetExited
InspectorDebugSession(11): Disposed
Couldn't connect to logcat, GetProcessId returned: 0
I checked Logcat and it seem to be having issues finding FFImageLoading library:
Time Device Name Type PID Tag Message
09-18 14:35:52.361 Huawei Nexus 6P Debug 1560 Mono AOT:
image '/usr/local/lib/mono/aot-cache/arm/FFImageLoading.Platform.dll.so'
not found: dlopen failed: library "/data/app/myapp.android.dev-
WEb1bz8edgF7vwx6uCoZ-A==/lib/arm/libaot-FFImageLoading.Platform.dll.so" not found
I have added Nuget package for FFImageLoading to my projects and Droid project references show it as in image below:
This worked for me :-
Deselecting the 'Use Shared Runtime' in Project Properties > Android
Options > Packaging properties
I also had this issue with Android 8.1 and Visual Studio 2017 15.7.4.
There are three steps to got it working again.
Under Android Options, go to Advanced and add your device architecture, in my case it was x86_64.
Go to Tools -> Options -> Xamarin > Android Settings and enable: Provide debug symbols for shared runtime and base class libraries.
And the final step is to delete following Apps from your device:
All Xamarin.Android API Support libraries
Mono Shared Runtime
Your App
After these steps you don't need to disable "Use Shared Runtime" and can Deploy and Debug much faster.
This is a known issue with Oreo and Xamarin Android on Visual Studio for Windows. It works on Visual Studio for Mac apparently. It will be fixed in an upcoming release. In the mean time there is a work around down near the bottom of the bug link above (comment 20).
deselecting 'Use Shared Runtime' in Project Properties > Android Options
delete bin & obj files from solution
clean solution
rebuild the solution it works
One another reason for that is if you dont enable usb debugging on your device, VS 2017 still recognizes your phone and installs the app on your phone. Just after debugging starts, it will throw this error and not continue debugging. Make sure to enable Developer Mode -> Usb debugging like described here
https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/set-up-device-for-development
i want to start a project that consist in mobile apps. can i develope native apps with Xamarin.Forms to the three platforms with a pc (Sony Vaio) and visual studio.
You can develop for Windows (Phone, or better yet Universal Windows Platforms Apps) and Android. They just work with Visual Studio.
If you want to build an iOS app as well, you are going to need a Mac. Building for iOS cannot be done without a Mac. There are a few options:
Buy a Mac laptop with a Windows VM; this is an option you see for most developers, however it is an expensive one because you're going to want a good MacBook Pro with a 1TB disk.
Buy a (cheap-ish) Mac (Mini); Xamarin is built so that you can let a standalone Mac machine do all the iOS building. All you have to do is install it with XCode and Xamarin, connect it to your network and you are ready to go. With the new Xamarin iOS Simulator for Windows you don't have to look at your Mac ever again. Let's be clear: the Simulator for Windows isn't a Simulator which runs on Windows. It simply mirrors the Simulator from your Mac.
Rent a Mac in the cloud. There are solutions like macincloud.com which let you rent a Mac hosted by them. They have different plans depending on your needs. The concept stays the same; you connect to a Mac in 'your network' (which is now over the internet) to build your iOS app.
Whichever option you choose; you are going to have to spend some extra money on Apple hardware to get to develop your iOS app.
I had a Web Application written on Visual Studio (C#) and I want to create mobile applications for iOS and Android.
Do I have to get a Mac OS platform (e.g. a MacBook) to develop an iOS application?
Yes. To be able to publish your ios app to the appstore, you do need a machine with a Mac OS.
In order to develop for iOS, you need to use Xcode, which is a Mac-exclusive piece of software. So unless you emulate a Mac environment on windows, you need to get a mac. PhoneGap is simply an API for the iOS platform (a great one, too!), and it would be in addition to the built-in iOS frameworks. From what I can tell from your question, you are simply asking about how to develop on iOS. It's a great process, and there are plenty of great books to get you started with iOS.
However, to answer your question, yes. In order to develop for iOS, you need a Mac environment.