0
votes

I am experiencing an issue were as when trying to build any IOS app (even a blank app with a single button and no code behind at all) using Xamarin on Visual Studio 2015, i receive the below error message:-

1>------ Build started: Project: anotherTest, Configuration: Debug iPhone 
1>  Generated session id: 918b34de762e8cb2603d83fb22be8494
1>  Generated build app name: anotherTest
1>  Connecting to Mac server 192.168.0.36...
1>  anotherTest -> D:\Local sites\XamarinFresh\anotherTest\anotherTest\bin\iPhone\Debug\anotherTest.exe
1>  Detected signing identity:
1>    Code Signing Key: "iPhone Developer: xxxx xxxxx (2YL57YJ875)" (62943356AF268E06164BD4D6432932995AF3A2CA)
1>    Provisioning Profile: "iOS Team Provisioning Profile: net.xxxxx.*" (05eb6d91-b645-4b45-ae20-b1c23576702c)
1>    Bundle Id: net.xxxxx.anothertest
1>    App Id: QCQ62TK5N6.net.xxxxx.anothertest
1>  SecKey API returned: -25320, (null)/Users/xxxxxxx/Library/Caches/Xamarin/mtbs/builds/anotherTest/918b34de762e8cb2603d83fb22be8494/bin/iPhone/Debug/anotherTest.app: unknown error -1=ffffffffffffffff
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1541,3): error : Tool exited with code: 1. Output: SecKey API returned: -25320, (null)/Users/xxxxx/Library/Caches/Xamarin/mtbs/builds/anotherTest/918b34de762e8cb2603d83fb22be8494/bin/iPhone/Debug/anotherTest.app: unknown error -1=ffffffffffffffff
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1541,3): error : 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have reinstalled Visual Studio 2015 and done all the available Xamarin updates, the Mac is accessible with the latest versions of all software and and the key chain settings have been set to always allow.

Can anyone shed any light on what is happening or why it doesn't build?

1
SecKey API returned: -25320 seems to be the big thing that pops out here. This sounds like a permissions error. Some other information we'd want to know is 1) What OSX version is this? 2) Have you tried updating to the latest OSX / Xcode / Xamarin versions?Jon Douglas
Thanks for the reply, OSX Mac OS is Sierra 10.12.2, as far as i am aware everything is updated to the newest version available on both the Mac and PCJon
Did u get any solution?Mehroze Yaqoob
@Jon, Did you find a solution to this?Sharique Abdullah

1 Answers

0
votes

On macOS when you type security error -25320 you get a further clue on what the issue is:

security error -25320
Error: 0xFFFF9D18 -25320 In dark wake, no UI possible

So, the code signing is triggering a UI challenge, of which it's not being allowed due to the way Xamarin runs builds. I came across this method of importing your keychain on macOS to avoid the issue:

security set-key-partition-list -S apple: -k <Password> -D <Identity> -t private <your.keychain>

Shout out to Bochun Bai for spending 3 weeks with Apple support to finding the solution to a somewhat similar sounding -25308 issue and posting it to https://sinofool.net/blog/archives/322