Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.Forms IOS error replacing existing signature

I think this error started happening after I change the provisioning profile.

My app is on visual 2017 Xamarin.Forms project and building through on Windows PC connected to a MAC book. The Android and UWP projects works fine.

I have tried:

  • uninstalling / reinstalling skiasharp package
  • uninstalling Xamarin.IOS with the uninstall script and emptying the cache folder on the MAC side
  • Allow full access to the keychains to all applications

Here is the error:

/Users/myusername/Library/Caches/Xamarin/mtbs/buildsenter code here/MyAppName.iOS/ec3fa8c87274cfb85c8423bb8f475608/bin/iPhone/Debug/MyAppName.iOS.app/Frameworks/libSkiaSharp.framework/libSkiaSharp: replacing existing signature /Users/myusername/Library/Caches/Xamarin/mtbs/builds/MyAppName.iOS/ec3fa8c87274cfb85c8423bb8f475608/bin/iPhone/Debug/MyAppName.iOS.app/Frameworks/libSkiaSharp.framework/libSkiaSharp: unknown error -1=ffffffffffffffff

Here is a related post but I don't understand it:

Codesign returns unknown error after "replacing existing signature"

UPDATE: More of the output after new version update to Xamarin.IOS v11:

Bundle Id: SentinelMobileTest
3>  App Id: XXXXXXXXX.SentinelMobileTest
3>  warning: no debug symbols in executable (-arch armv7)
3>  warning: no debug symbols in executable (-arch arm64)
3>/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: changes being made to the file will invalidate the code signature in: /Users/ericbourque/Library/Caches/Xamarin/mtbs/builds/SentinelMobile.iOS/ec3fa8c87274cfb85c8423bb8f475608/bin/iPhone/Debug/SentinelMobile.iOS.app/Frameworks/libSkiaSharp.framework/libSkiaSharp (for architecture armv7)
3>/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: changes being made to the file will invalidate the code signature in: /Users/ericbourque/Library/Caches/Xamarin/mtbs/builds/SentinelMobile.iOS/ec3fa8c87274cfb85c8423bb8f475608/bin/iPhone/Debug/SentinelMobile.iOS.app/Frameworks/libSkiaSharp.framework/libSkiaSharp (for architecture arm64)
3>/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: removing global symbols from a final linked no longer supported.  Use -exported_symbols_list at link time when building: /Users/ericbourque/Library/Caches/Xamarin/mtbs/builds/SentinelMobile.iOS/ec3fa8c87274cfb85c8423bb8f475608/bin/iPhone/Debug/SentinelMobile.iOS.app/SentinelMobile.iOS (for architecture armv7)
3>/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: removing global symbols from a final linked no longer supported.  Use -exported_symbols_list at link time when building: /Users/ericbourque/Library/Caches/Xamarin/mtbs/builds/SentinelMobile.iOS/ec3fa8c87274cfb85c8423bb8f475608/bin/iPhone/Debug/SentinelMobile.iOS.app/SentinelMobile.iOS (for architecture arm64)
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1689,3): error : /Users/ericbourque/Library/Caches/Xamarin/mtbs/builds/SentinelMobile.iOS/ec3fa8c87274cfb85c8423bb8f475608/bin/iPhone/Debug/SentinelMobile.iOS.app/Frameworks/libSkiaSharp.framework/libSkiaSharp: replacing existing signature
3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1689,3): error : /Users/ericbourque/Library/Caches/Xamarin/mtbs/builds/SentinelMobile.iOS/ec3fa8c87274cfb85c8423bb8f475608/bin/iPhone/Debug/SentinelMobile.iOS.app/Frameworks/libSkiaSharp.framework/libSkiaSharp: unknown error -1=ffffffffffffffff
like image 577
E. Bourque Avatar asked Sep 08 '17 07:09

E. Bourque


1 Answers

Issue was having multiple certificates and provisioning profiles.

The automatic signing did not know which profile to use.

Solution steps that worked for me:

  1. Delete and revoke all certificates, app id's and provisioning profiles in Apple Developper that match your app ID
  2. Delete all keychains in MAC used for compiling that contain your certificate or app id
  3. Make new ones with different names and new bundle ID that you can easilly identify (the old ones will still be in the Visual Studio list)

  4. Enjoy a clean compilation.

If anyone know a cleaner way to do this feel free to post.

like image 184
E. Bourque Avatar answered Sep 20 '22 16:09

E. Bourque