question

YuvalTirosh-6818 avatar image
0 Votes"
YuvalTirosh-6818 asked NicoleLu-9366 commented

Xamarin on VS for Mac - iOS Build Fails with Error "resource-rules has been deprecated in Mac OS X >= 10.10!"

Hi!
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:41792-buildoutput.txt
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 but couldn't find a recent solution.
Any help would be appreciated.
Cheers,
Yuval


dotnet-xamarinformsdotnet-iosdotnet-macos
buildoutput.txt (370.5 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

May I ask what's your VS for Mac version? Could you try with the latest VS for Mac and see if it has the same problem if it's not the latest first?

0 Votes 0 ·

Sure, it's Visual Studio Community 2019 for Mac Version 8.8.2 (build 41), I also upgraded Xamarin for iOS to latest, no difference.

0 Votes 0 ·

@YuvalTirosh-6818 I did some research and didn't find a recent solution, as this is not reproduceable at my side, I'm suggesting you post to https://developercommunity.visualstudio.com/spaces/41/index.html or open a support ticket to get a quick help: http://support.microsoft.com/supportforbusiness/productselection?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6

1 Vote 1 ·

0 Answers