I am trying to run leak checks on my app, but could not find it in the "Choose target section". I have all other apps listed except mine.
I'm using Xcode 4. I did Product->Perform Action->Profile Without Building
When the Instruments app comes up you should notice you app is now in the selected dropdown and you'll have to drag and drop what tools you want to use to monitor your app from the library.
Related
I am trying to develop android and iOS application using xamarin.forms. And already completed the main part that includes Canvas drawing. For that, I have used Skiasharp, to perform operations on bitmap images.
Now, in android,
1. If I try to dispose bitmaps that I initialized before I get SIGSEGV fatal error. (I think this issue is not OS specific)
2. When I continuously run my app for 20-22 minutes, app crashes suddenly.
And in iOS,
my iphone gets hanged when I run my app for long time. And it doesn't start until I uninstall app from iFunBox in my pc.
I wanted to ask if there are ways in xamarin.forms or in native projects to find out where my memory is leaking.
How can I know how much memory of RAM is actually being used at the moment ?
Thank you
For Android, you can use the Android Debug Monitor tool. This is a tool that is installed as part of the Android SDK.
Below is the URL for more information:
https://www.codeproject.com/Articles/798462/Diagnosing-Memory-Usage-in-a-Xamarin-Android-Appli
For iOS, you can try to use the native XCode Instrument.
Below is the URL for more information:
https://developer.xamarin.com/guides/ios/deployment,_testing,_and_metrics/using_instruments_to_detect_native_leaks_using_markheap/
Also, Below is a useful article that talk about Xamarin.Forms Memory management.
Hopefully it will be helpful.
https://igorelikblog.wordpress.com/2016/07/08/xamarin-form-memory-management/
I've developed a cross platform for iOS and android using Xamarin Forms. My app uses several screens and some tjird party dependencies such as Facebook, google maps and firebase.
Everything works good until I went to compile it in release mode. Assuming I want to support both armv7 and arm64, these are the app size:
* without linking and optimization: 103mb.
* with full optimization (link all + LLVM): 73mv.
With the optimization and without armv7 I'm getting 40mb - that's my desired result size.
To solve this issue I thought that I should enable bitcode compilation. However, even with the alpha tools, including visual studio for mac and mono v5 I'm getting "platform not supported: iOS" when enabling this feature. On the other hand, I dogged at the source code and saw that mono does allow it, and besides they allows watch and tv apps, which requires bitcode...
Does anybody knows how to enable it for iOS? I'll be huge (!) assistance for me!
Thanks!
So I couldn't find any solution and had to submit my app w/o bitcode support.
However, for everyone who may tackle this issue in the future and wish to use bitcode because of app size - I want to clarify this: Bitcode, as part of iOS 9 App Thining, is only relevant to future architecture releases, i.e. Apple will auto-slice your arm7+arm64 app when you'll upload it to the App Store, without any action from your side (besides linking your code ("Link All") and supporting both architectures).
You can check the estimated app size, but you shouldn't do it in Xamarin Studio since it shows the universal app version, and not the device-specific thinned one. To check what the size will be for device X, you should:
Create Ad-Hoc Distribution profile Apple Developer Site.
Create an archive at Xamarin Studio.
Open Xcode (if it was previously opened - close an re-open).
Open the Organizer.
Click on Export, then on "Ad Hoc".
You should see a dialog asking if you want universal ipa or device specific ipa. Universal IPA is a generic IPA containing the data for every device, so you can send it to everyone. The size of this ipa will be the size you saw in Xamarin Studio (before compression). A device-specific ipa is an ipa for specific device, after performing Thining. This is the ipa your users will download. So - select the device you wish to check.
Now you'll be able to get a device-specific ipa which matches the size for this specific device. Note that the same information will appear in iTunes Connect after you'll upload your build.
See:
So to summarize it: Currently you can't use bitcode in Xamarin apps (iOS and Forms, obviously). The option does exists in mono, but not included (it was explicitly disabled in the shipped mono runtime). However, that doesn't mean that the estimated app size that's being displayed in Xamarin Studio will be your users app size, since it varies on iOS 9+ App Thining feature, which doesn't need bitcode to be activated.
I have VS 2015 Community with Xamarin, Android SDK, etc. installed and today I stumbled upon SyncFusions Controls for X.F that are free in the community license. I installed the SyncFusion Essentials Studio for Xamarin.Forms.
The problem is that I cant run the included Samples like SampleBrowser or ServerMonitor when I select Android or iOS. If I select UWP or WinPhone the apps run.
The issue is that the projects do not build. In The SampleBrowser for example I get 1400+ Errors when I want to build. VS recognizes almost nothing of the Code. But as I said everything that is not a Droid/iOS Project runs.
I have the Android SDK installed with API 19-23. AVDs are also configured. I also have a Macbook Air next to me that is connected to VS.
I tried cleaning the solution and re-building the solution without success. There were also no changes to the code made.
Edit: Here is a picture of the error list:
Edit 2: Here is the error list from "build only" on pastebin and as an image:
I found the solution. The comment to only show "build" errors lead to the errorlist you see in Edit2. There you see an OutOfMemory-Error. The resolution is the following.
I copy the solution in case the site will go down. Source: http://www.kiwipiet.com/2016/05/javalangoutofmemoryerror-consider.html
"I was getting a java.lang.OutOfMemoryError while trying to compile a Xamarin Android application after adding HockeyApp.
I found to ways to resolve this.
The first option is to add a Environment Variable called _JAVA_OPTIONS and set it to -Xmx1g. This sets the JVM heap size to 1GB. You can either do this from the commandline by calling
SET _JAVA_OPTIONS = -Xmx1g
Or you can edit your system environment variables:"
The “java.lang.OutOfMemoryError” error is a Xamarin issue and it occurs when the app size is exceeded some limit. You can refer the following bug report.
https://bugzilla.xamarin.com/show_bug.cgi?id=18327
Solution:
Right click the Android project and select Properties > Android Options > Advanced
Set the Java Heap size as 1G.
For a live/testing Universal Windows Platform(UWP) application how I can get crash reports? Is there any SDK for UWP, Like for iOS/Android platform Crashlytics provide symbolicated report about an application crash.
Following Details I want in a crash report
1. Device Details - like Device Name, Model etc
2. OS Version
3. File Name - In which app crash
4. Line Number - In which app crash
5. Parents Method - Parents Method of method in which app crash
6. Other threads details
I want something similar to Crashlytics SDK, like for iOS. Here the screenshot one of my iOS application which contains crash details
I suggest that you may use Hockeyapp, you may merge Hockeyapp SDK to your app, it will help you collect crash report and some other things. HockeySDK.UWP is in process now, you may use HockeySDK.WINRT instead. Here is the link.
Hockeyapp for UWP is in "preseason" so currently in development but available for users already.
just sign up for Hockeyapp with a free accound and apply for "preseason" you'll get access to UWP and other beta features in a few days. (at least I received access quite fast on multiple accounts)
when you have access it's just adding this nuget package:
https://www.nuget.org/packages/HockeySDK.UWP
Microsoft Application Insights also has some good functionality for this but it's deprecated since last month where Microsoft tells you to move to Hockeyapp
I'm trying to use EQATEC Profiler to profile my ASP.Net app. I am following the below steps to do it. I have selected the application's bin folder in App path and clicked on the build button. Then I have run the application from visual studio 2005. However, i don't see the reset counter or take snapshot buttons enabled. Please help.
You'll find a nice step-by-step instruction and explanation in this thread.
I may also have an explanation of what's going wrong for you:
You compile your asp.net app in VS2005 - fine
You then instrument and overwrite your app using Build in the profiler - also fine
But then you run your app from VS2005 and that may re-compile your app again so you're running an un-instrumented version. Instead of running it from VS2005 you should simply have IIS "launch" the code by navigating to the corresponding webpage.
If this is not the problem then take a look at the log-file generated by the running, profiled app. By default the log-file is located in C:\Windows\Temp\EQATECProfilerLogs\profiler.log.