I have a large project that compiles after "Clean Up".
However, whenever I try to rebuild the project, I get the following error:
Tool /usr/bin/codesign execution started with arguments: --verify -vvvv -R='anchor apple generic and certificate 1[field.1.2.840.1136220.127.116.11.1] exists and (certificate leaf[field.1.2.840.113618.104.22.168.2] exists or certificate leaf[field.1.2.840.113622.214.171.124.4] exists)' bin/iPhone/Debug/build-iphone5.3-10.2/ClimbTagApp_iOS.app
bin/iPhone/Debug/build-iphone5.3-10.2/ClimbTagApp_iOS.app: code object is not signed at all
In architecture: armv7
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: error : Tool exited with code: 1. Output: bin/iPhone/Debug/build-iphone5.3-10.2/ClimbTagApp_iOS.app: code object is not signed at all
In architecture: armv7
Task "CodesignVerify" execution -- FAILED
Done building target "_CodesignVerify" in project "/Users/shayo/Projects/iOS/ClimbTagApp.iOS.csproj".-- FAILED
Done building project "/Users/shayo/Projects/iOS/ClimbTagApp.iOS.csproj".-- FAILED
Cleaning the project and recompiling leads to a successful compilation.
This is very annoying - I basically need to run full compilation for every tiny change of the code.
Xamarin Studio information below:
=== Xamarin Studio Business ===
Version 6.2 (build 1686)
Installation UUID: 07360e74-2c80-443b-94a1-6221c776bc97
Mono 4.8.0 (mono-4.8.0-branch/df81fe4) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 408000395
=== NuGet ===
=== Xamarin.Profiler ===
=== Apple Developer Tools ===
Xcode 8.2 (11759)
=== Xamarin.iOS ===
Version: 10.4.0.54 (Xamarin Business)
Build date: 2016-12-17 15:04:15-0500
=== Xamarin.Mac ===
Version: 126.96.36.1994 (Xamarin Business)
=== Xamarin Inspector ===
=== Xamarin.Android ===
Version: 188.8.131.52 (Xamarin Business)
Android SDK: /Users/shayo/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
SDK Tools Version: 25.2.2
SDK Platform Tools Version: 24.0.3
SDK Build Tools Version: 23.0.2
Java SDK: /usr
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)
Android Designer EPL code available here:
=== Xamarin Android Player ===
Location: /Applications/Xamarin Android Player.app
=== Build Information ===
Release ID: 602001686
Git revision: 3e8b559b32962db4d3860072ce79dee44f0c6a88
Build date: 2016-12-15 09:09:49-05
Xamarin addins: d83d393881f04cf1f62093120f1ed619e3a13c5b
Build lane: monodevelop-lion-cycle9
=== Operating System ===
Mac OS X 10.12.1
Darwin Shays-MacBook-Pro.local 16.1.0 Darwin Kernel Version 16.1.0
Thu Oct 13 21:26:57 PDT 2016
@Shay can you please attach a complete "rebuild" build log so we can see what went wrong (earlier) in the build ? thanks!
Created attachment 19005 [details]
Failed Rebuild log
Created attachment 19006 [details]
Successful build log
@Jeff any of the unit tests project in xamarin-macios shows the same issue. E.g.
1. Build monotouch-tests for iPhone/Release -> fine
2. Change a build option, e.g. switch LLVM;
3. Build monotouch-tests for iPhone/Release -> this error
The workaround is doing a Clean between builds.
Based on the log, it looks like the timestamps on the files listed in the Inputs have not changed and so it is not resigning.
I probably just need to figure out what other file(s) need to be in that Inputs list.
Working on that now...
Looks like I accidentally used "%(_NativeExecutable.Identity)" (which doesn't exist because _NativeExecutable is a *Property* and not an *Item*) instead of "$(_NativeExecutable)"
That said, we should also add the Info.plist and embedded.mobileprovision to the Inputs as well as potentially the native libraries/frameworks (need more investigation into this...).
When the .app contains frameworks, _CodeSignature/CodeResources includes hashes for them... so it looks like we need to include frameworks in the Inputs as well.
PR master: https://github.com/xamarin/xamarin-macios/pull/1438
PR cycle9: https://github.com/xamarin/xamarin-macios/pull/1439
@Jeff, maybe we should read/parse _CodeSignature/CodeResources to get the list of inputs? If anything in that file listed in that file is changed, it will invalidate the signature.
I can also reproduce this Issue with XI 10.4.0.54 with steps mentioned in comment#5 using iOS template project. Below is the build output for the same:
Build Output: https://gist.github.com/saurabh360/3a4a15f819441d2ac9deafa886294b91
I have checked the same Issue with latest Cycle 9 build(XI 10.4.0.96) and Master build (XI 10.5.0.403). This is working fine now.
Build Output: https://gist.github.com/saurabh360/0b7ce3b57d7205eccd9cad0014ff730a
Environment Info: https://gist.github.com/saurabh360/c7bc12cb288ca6f845445a5fd378bc92