Ad-Hoc device coding excels in Studio, Fails in Jenkins

I have an Xamarin Forms app that supports Android and iOS. I generated Jenkins assemblies to compile them. All Android build work. IOS debugging design compiles fine. However, the Ad-Hoc assembly is not completely built for the purpose of the iPhone. It seems to not work with code coding. It works if I target iPhoneSimulator, but if I target iPhone device, it fails.

The execution of the / usr / bin / codesign tool began with the arguments: -v -force --sign 81088F8E194139DC4C6CE640716944E41FB0709F --entencesments / Users / Shared / Jenkins / .jenkins / workspace / {project path} / obj / iPhone / Ad -Hoc / Entitlements. xcent "--deep" /Users/Shared/Jenkins/.jenkins/workspace/{project path} /bin/iPhone/Ad-Hoc/AppName.app "bin / iPhone / Ad-Hoc / AppName.app: error: / Users / Shared / Jenkins / .jenkins / workspace / {project path} /bin/iPhone/Ad-Hoc/AppName.app: unknown error -1 = ffffffffffffffff [/Users/Shared/Jenkins/.jenkins/workspace/{project path } /iDriverMobile.iOS.csproj]

If I open the solution in Visual Studio, right in the Jenkins workspace folder so that it uses the exact files, then the compilation works fine, which is really frustrating.

If you look at the differences between the two outputs, it seems that the working assembly (from Studio) has an AOT output for all assemblies that look like this:

Mono Ahead of Time compiler - assembly build /Users/Shared/Jenkins/.jenkins/workspace/{project path} /obj/iPhone/Ad-Hoc/mtouch-cache/32/Build/OpenNETCF.GoogleAnalytics. Dll

An unsuccessful build does not have any of them. Instead, it has a couple of lines that look like this:

MTOUCH: Warning MT0095: Aot files cannot be copied to the target directory /Users/Shared/Jenkins/.jenkins/workspace/{project path} / obj / iPhone / Ad-Hoc / mtouch-cache / 64 / Build / Msym / Msym / tmp: Failed to start the process. [/Users/Shared/Jenkins/.jenkins/workspace/{project path} /AppName.csproj]

Worst of all, these builds really worked, but then I restarted the Mac Mini that Jenkins is working on and everything went down. I cannot understand what the difference is between what Studio does and the command line call for msbuild. Both of them point to the same binaries.

Additional Information This still fails with the latest updates to date (5/24/17). This is Wednesday:

  • Mac OS X 10.12.5
  • List item
  • Xcode 8.3.2
  • Xamarin.iOS 10.10.0.36
  • Visual Studio 2017 Community for Mac 7.0.1 (Build 24)
  • Mono 5.0.1.1

What not to fix:

  • Create a new Jenkins build
  • Change the Jenkins workspace path
  • Open Permissions (777) for the entire Jenkins folder
  • Enable LLVM
  • Disabling All Links
  • Completely uninstall and reinstall Jenkins
  • Using xbuild instead of msbuild
  • The oath is many.
  • My middle finger
+8
visual-studio jenkins xamarin
source share
1 answer

Try deleting the derived data folder in the DerivedData your application. It looks like YourAPP_ dasfdsfsdafdsasfdsaf , according to this from the Apple Developer Forum.

The DerivedData data DerivedData is located in ~/Library/Developer/Xcode/DerivedData/

If this does not work, all symptoms indicate the issuance of a signature certificate (also called signature).

It appears that when it was compiled from the command line, /usr/bin/codesign cannot access the signature identifier 81088F8E194139DC4C6CE640716944E41FB0709F . Unfortunately, there can be many different reasons:

  • keychain is locked
  • codesign not allowed to access subscription identity.
  • there are several identifiers in the keychain and the wrong signature was chosen
  • The wrong position of the profile was compared for the assembly of Ad Hoc.

Try adding the following code snippets before running msbuild , assuming your signature ID is in keychain ~/Library/Keychains/login.keychain :

 security unlock-keychain -p <password> ~/Library/Keychains/login.keychain security set-keychain-settings -l -u -t 3600 ~/Library/Keychains/login.keychain security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k -p <password> ~/Library/Keychains/login.keychain 

It is not recommended to store the keychain password in the assembly script, you can follow this guide to hide them.

+1
source share

All Articles