0

I'm trying to build my Xamarin iOS app on Mac and failing on an error related to a deprecated command line parameter. I tried targeting iphone 10, 11 and above but still failing on same error. I Updated NuGets to latest versions, also tried creating an empty ResourceRules.plist file.

Xcode 12.1 (17222) Build 12A7403 === Xamarin.Mac === Version: 6.22.1.26 (Visual Studio Community) === Xamarin.iOS === Version: 14.4.1.3 (Visual Studio Community) === Operating System === Mac OS X 10.15.7

Build Command from log:

Tool /Applications/Xcode.app/Contents/Developer/usr/bin/actool execution started with arguments: --errors --warnings --notices --output-format xml1 --output-partial-info-plist /Users/user182752/Downloads/App1/App1.iOS/obj/iPhone/Release/actool/partial-info.plist --app-icon AppIcon --compress-pngs --target-device iphone --target-device ipad --minimum-deployment-target 11.0 --platform iphoneos --compile /Users/user182752/Downloads/App1/App1.iOS/obj/iPhone/Release/actool/bundle /Users/user182752/Downloads/App1/App1.iOS/obj/iPhone/Release/actool/cloned-assets/Assets.xcassets

... ...

Copied /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/obj/iPhone/Release/mtouch-cache/arm64/Plugin.Settings.aotdata.arm64 to /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app/Plugin.Settings.aotdata.arm64 /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app built successfully. Creating "bin/iPhone/Release/mtouch.stamp" because "AlwaysCreate" was specified. Target _CopyITunesArtwork: Copying file from "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/iTunesArtwork@2x" to "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/iTunesArtwork@2x". Target _CopyITunesArtwork: Copying file from "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/iTunesArtwork" to "/Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/iTunesArtwork". Target _CopyAppExtensionsToBundle: Skipping target "_CopyAppExtensionsToBundle" because it has no inputs. Target _GenerateAppExtensionDebugSymbols: Directory "bin/iPhone/Release/MyDemoApp.iOS.app/../.dSYM" doesn't exist. Skipping. Target _CollectFrameworks: No Frameworks directory found.

Target _GenerateFrameworkDebugSymbols: Skipping target "_GenerateFrameworkDebugSymbols" because it has no inputs. Target _GenerateDebugSymbols: Directory "bin/iPhone/Release/MyDemoApp.iOS.app.dSYM" doesn't exist. Skipping. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil -num-threads 4 -z -o bin/iPhone/Release/MyDemoApp.iOS.app.dSYM bin/iPhone/Release/MyDemoApp.iOS.app/MyDemoApp.iOS /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -i -s obj/iPhone/Release/mtouch-symbols.list bin/iPhone/Release/MyDemoApp.iOS.app/MyDemoApp.iOS /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: warning: removing global symbols from a final linked no longer supported. Use -exported_symbols_list at link time when building: /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app/MyDemoApp.iOS Touching "bin/iPhone/Release/MyDemoApp.iOS.app.dSYM/Contents/Info.plist". /usr/bin/mdimport bin/iPhone/Release/MyDemoApp.iOS.app/../ Target _CodesignAppBundle: Tool /usr/bin/codesign execution started with arguments: -v --force --timestamp=none --sign 5FC337A423A139F99B2D118EC7FA72D8D0D94ABE --resource-rules /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app/ResourceRules.plist --entitlements /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/obj/iPhone/Release/Entitlements.xcent /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app

bin/iPhone/Release/MyDemoApp.iOS.app : error : Warning: --resource-rules has been deprecated in Mac OS X >= 10.10! bin/iPhone/Release/MyDemoApp.iOS.app : error : /Users/user182752/Downloads/MyDemoApp/MyDemoApp.iOS/bin/iPhone/Release/MyDemoApp.iOS.app: invalid resource specification rule(s)

Done building target "_CodesignAppBundle" in project "MyDemoApp.iOS.csproj" -- FAILED.

I saw some references to this error mainly in old posts referring to code signing but couldn't find a recent solution referring to Xamarin. Any help would be appreciated. Cheers, Yuval

  • Hi , have a look at these discussions: https://stackoverflow.com/questions/26459911/resource-rules-has-been-deprecated-in-mac-os-x-10-10 and https://github.com/nomad/shenzhen/issues/236#issuecomment-88688098. – Junior Jiang Nov 24 '20 at 07:35
  • Thanks @JuniorJiang-MSFT, Indeed those seem like the same signing issue but the posts refer to xcode builds, not Xamarin, so they could add these parameters as work-arounds. I tried that in Xamarin and failed. The problem is in the signing stage and occurs when I choose the Release-iPhone configuration. I tried running the sign command from terminal and am getting the error "invalid resource specification rule(s)". – yuval tirosh Nov 24 '20 at 19:56
  • Okey, if you use release mode to run, whether select the [Enable Debug]( https://i.stack.imgur.com/OXdnr.png) the option. I'm not sure whehter it's relaeted to your problem, but you can have a try. – Junior Jiang Nov 25 '20 at 03:19
  • No luck. The problem is with the signing stage. I tried running codesign manually and getting the same error regarding "invalid resource specification rule(s)". – yuval tirosh Nov 25 '20 at 10:28
  • Okey, whether you had a try to set the **MinimumOSVersion** version above from 11.0 to check whether it works? – Junior Jiang Nov 26 '20 at 02:44
  • Tried various versions, no use. I tend to believe something is wrong with the project itself causing the error regarding resources. I removed the Info.plist and entitlements from the codesign command and still failing. – yuval tirosh Nov 26 '20 at 06:38
  • Do you have a try with this: https://developer.apple.com/forums/thread/64265 ? – Junior Jiang Nov 26 '20 at 07:06
  • Yeah, saw that, my file doesn't have "CFBundleResourceSpecification"in the first place :-) – yuval tirosh Nov 26 '20 at 09:15

0 Answers0