Does Xamarin Support ASLR for iOS and Android? - xamarin

As I understand it iOS has supported Address Space Layout Randomisation (ASLR) since iOS 4.3 and Android since 4.0.
Is this functionality supported by Xamarin?

On xamarin-macios, PIE is enabled by default during the app's AOT process, unless you disable it via mtouch:
{ "pie:", "Enable (default) or disable PIE (Position Independent Executable).", v => { app.EnablePie = ParseBool (v, "pie"); }},
On xamarin-android, AOT'ing the app's assemblies is not the default, so PIE means nothing to the managed/IL code.
As for the mono runtime, the make file enables -pie / -fPIE by default.
But in the end, none of that matters to security professionals as you should be using tools like readelf to verify the binaries that you are publishing are DYN enabled.

Related

App is not listed in Focus filter Settings if we build using XCode 14.1

We have implemented the focus filter using the AppEntity param type, Our app is visible in focus filter settings if we build/run with XCode 14 or 14.0.1. But the same is not if we run using the latest XCode 14.1.
Note: Our code base has both Objective C and Swift and minimum support for iOS 11. Previously(with XCode 14), faced crash issues earlier iOS 16 devices as the AppIntents library was not loaded which is fixed by a workaround including the "AppIntents" framework as optional/weak under link binary with Libraries in build phases.
Our Foucs filter has only single parameter/variable. Tried with changing the parameter type to string then it is visible, Subtyp of AppEnum or AppEntity is not working as expected.

What are the "Requires full screen" and "Supports multiple windows" options in Info.plist for a Xamarin iOS deployment?

Does anyone know what these options on the iOS deployment for a Xamarin Forms app do? I can't find any place they are documented:
1) Requires full screen
2) Supports multiple windows
Requires Full screen and Supports Multiple Windows
IOS 9+ supports resizable apps with multi-window support. Unless you are re-writing your app to support multi-window, you will be requiring 'Full screen'. This is a hint to iOS that you do not support multi-window, and basically makes iOS 9+ work like previous versions in this regard.
You can have a look at this document .
In addition : About Supporting Multiple Windows in iPad
iOS 13 now supports side-by-side windows for the same app on iPad. This enables new experiences and drag-and-drop interactions between windows. This document shows you how to setup your application to support this feature, and introduces these new features.
Here is the document .

How to enable Visual Memory Debugger in Xcode 8?

I migrated a project from the previous version of Xcode to Xcode 8. What I want is to use the new visual memory debugger. It's available in new projects, but is entirely missing in my imported one. Why is this?
It appears that Swift 3 is required for Visual Memory Debugger to work.
My app migrated to Swift 2.3 did not work, when I tried migrating it to Swift 3.0 it worked instantly.
The runtime sanitization checkbox is not required for visual memory debugger to work, however the reason that it is disabled is the same.
It seems like the project requires Swift 3 to enable Adress & Thread Sanitizer (which is the Memory Debugger).
For me this applies to both iOS & OS X/macOS apps. Both written in Swift 2.2 & converted to 2.3.
Note: I only tested this on OS X El Capitan 10.11.5.
#gabriellanata confirms that it works when the code is converted to Swift 3.
I just ran an Objective-C iOS 7 project made with Xcode 7 in Xcode 8 (without migrating) and the Visual Memory Debugger icon appears at the bottom of Xcode in the debugging area next to the Debug View Hierarchy button.
It's the button with the three circles.
From the other comments, it looks like Swift 3 might be required to use this feature.
Argument '-sanitize=address' is not supported on the Swift 2.3 toolchain.
You will need to migrate your project to Swift 3 to use this feature.
Xcode 8 GM build error
P.S. Objective-c supported by Visual Memory Debugger
If you click on Memory, the source editor pane will change to show some memory information, including why it's disabled. In my case, it was because I had Zombie Objects enabled in the Scheme. (Xcode 8.3.2)

how to enable opengl es frame capture in xcode 4.3.1

Just cannot find UI for enabling the opengl es frame capture.
I know in xcode 4.2 document, the interface is in Edit Scheme as link below. But not found in 4.3 at this place.
http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_2.html#//apple_ref/doc/uid/00200-SW1
There is no longer a check box to enable this.
You need to have the OpenGLES.framework in the Project Navigator for the camera icon to appear. (I have several apps with it included via linker settings, which is not picked up).
If it still fails, try removing it and re-adding it, and also add it to your Build Phases/Link Binary With Libraries. I've found this to be pretty reliable.
Capture GPU Frame is greyed out for me when I run a simulator. It seems like it needs a real device.

iOS 3.x support in Xcode 4

Is it possible to write apps that support iOS 3.x versions using Xcode 4? If so, how? And does Apple have any official recommendations on app backwards-compatibility?
To get your app successfully run in iOS 3.x device, follow these steps (Xcode 4.2):
Click on your project name, select your Target and under "Build Settings"
a) Set "iOS development target" (under "Deployment") to 3.0
b). Add "armv6" to list of "Architectures" (under "Architectures").
c) Set "Other Linker Flags" (under "Linking") to "-weak-lSystem".
In your Info.plist file remove value of "armv7" from "Required device capabilities" (UIRequiredDeviceCapabilities).
In your code:
a). Do not use userInterfaceIdiom. If you need to know, what device is it (iPhone or iPad), see How does one get UI_USER_INTERFACE_IDIOM() to work with iPhone OS SDK < 3.2.
b) Do not use window.rootViewController. Instead use [window addSubview: self.mainViewController.view]; to add your main controller's view to window.
Click on your project name, select your Target and under "Build Phases" / "Link Binary With Libraries" set "UIKit.framework" to "Optional". Also set to optional any extra framework, which is not available in iOS 3. For example, if you're using iAd or Twitter frameworks they should be set to optional. Check availability of extra framework in your code before use.
When run on real device, compile app against last version of SDK. To do so, select second item from "Scheme" drop down (otherwise you'll get compile error related to your optional SDKs):
Yes, you can develop apps that support previous iOS versions with the current iOS SDK.
For official recommendations, see Apple's SDK Compatibility Guide.
The version of Xcode that you use isn't related to the version of iOS that your app can support. To choose the version of iOS that your app supports, simply change the iOS deployment target in your project settings. Then just be sure not to use any APIs from versions later than that.
to be sure, you can use Xcode 4 for targeting iOS 3.x as a deployment target, but you will not be able to simulate your program on a iOS 3.x SDK simulator. So you are pretty on your own (i.e., if you use any iOS 4.x-only feature, you will not find out it until you test on a physical device).
You need an older version of Xcode to debug against an older simulated SDK.

Resources