BreachDetector
BreachDetector copied to clipboard
Error on iOS project after Build
I created an empty Xamarin Forms project and installed the library and used it as follow:
using Plugin.BreachDetector;
using Xamarin.Forms;
namespace AppTest1
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
var isRootOrJailbreak = CrossBreachDetector.Current.IsRooted();
var isVirtualDevice = CrossBreachDetector.Current.IsRunningOnVirtualDevice();
var inDebug = CrossBreachDetector.Current.InDebugMode();
var fromStore = CrossBreachDetector.Current.InstalledFromStore();
var localAuthentication = CrossBreachDetector.Current.GetDeviceLocalSecurityType();
Editor1.Text = $"isRootOrJailbreak: {isRootOrJailbreak}\r\n" +
$"isVirtualDevice: {isVirtualDevice}\r\n" +
$"inDebug: {inDebug}\r\n" +
$"fromStore: {fromStore}\r\n" +
$"localAuthentication: {localAuthentication}";
}
}
}
When I build the solution I get the following error for the iOS project:
The command "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/../../../../../Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-stdlib-tool --copy --verbose --sign '0A825830F389F6906AD0907900B02766E7A56200' --scan-executable 'bin/iPhone/Debug/device-builds/ipad13.2-14.2/AppTest1.iOS.app/AppTest1.iOS' --scan-folder 'bin/iPhone/Debug/device-builds/ipad13.2-14.2/AppTest1.iOS.app/Frameworks/' --scan-folder 'bin/iPhone/Debug/device-builds/ipad13.2-14.2/AppTest1.iOS.app/PlugIns/' --platform 'iphoneos' --toolchain '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/../../../../../Toolchains/XcodeDefault.xctoolchain/' --destination 'bin/iPhone/Debug/device-builds/ipad13.2-14.2/AppTest1.iOS.app/Frameworks/' --resource-destination 'bin/iPhone/Debug/device-builds/ipad13.2-14.2/AppTest1.iOS.app/' --resource-library libswiftRemoteMirror.dylib --unsigned-destination 'obj/iPhone/Debug/device-builds/ipad13.2-14.2/SwiftSupport' --strip-bitcode --strip-bitcode-tool '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/../../../../../Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip' --emit-dependency-info 'obj/iPhone/Debug/device-builds/ipad13.2-14.2/SwiftStdLibToolInputDependencies.dep' --source-libraries '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/../../../../../Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphoneos'" exited with code 255.
This is the content of the "info.plist" file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>10.0</string>
<key>CFBundleDisplayName</key>
<string>AppTest1</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.AppTest1</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
<string>AppTest1</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>cydia</string>
<string>undecimus</string>
<string>sileo</string>
<string>zbra</string>
</array>
<key>NSFaceIDUsageDescription</key>
<string>Use a nice explanation here</string>
</dict>
</plist>
Any help?
Hi, do you have any news on this issue ? I have the same issue on my project.
Hi. No I don't have any news. I think the library is outdated and it needs to be updated.
I've also observed the same issue. After a bit of debugging, I can say for sure that this only happens when we try to build on Windows using Visual Studio as IDE. On Visual Studio for macOS everything is working fine.
Using Rider as IDE works fine building solutions on both Windows & macOS.
The builds fail for both real device & simulators. The build problems are due to the fact that this library uses the same code as the iOS standalone one (https://github.com/nmilcoff/IOSSecuritySuite). The same issues happens there as well.