MT1045 When trying to deploy MAUI app to iPhone
I have an XF application that I am upgrading to MAUI.
I can deploy to Android Emulator and Device fine. Trying to deploy and it is not working.
If I try to deploy to a Simulator I get the following error
2>Tool xcrun execution finished (exit code = 1).
2>In file included from /Users/macmini3/Library/Caches/Xamarin/mtbs/builds/ProjectBreatheApp.Maui/c71940fb872bbd0f6ad50d7e444523ad79bb9e154c1d4fa4a69aa86313b02b66/obj/Debug/net8.0-ios/ios-arm64/linker-cache/registrar.mm:3:
2>/Users/macmini3/Library/Caches/Xamarin/mtbs/builds/ProjectBreatheApp.Maui/c71940fb872bbd0f6ad50d7e444523ad79bb9e154c1d4fa4a69aa86313b02b66/obj/Debug/net8.0-ios/ios-arm64/linker-cache/registrar.h:25:9: fatal error: 'ThreadNetwork/THClient.h' file not found
2>#import <ThreadNetwork/THClient.h>
2> ^~~~~~~~~~~~~~~~~~~~~~~~~~
2>1 error generated.
2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1402,3): error : clang exited with code 1:
2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1402,3): error : In file included from /Users/macmini3/Library/Caches/Xamarin/mtbs/builds/ProjectBreatheApp.Maui/c71940fb872bbd0f6ad50d7e444523ad79bb9e154c1d4fa4a69aa86313b02b66/obj/Debug/net8.0-ios/ios-arm64/linker-cache/registrar.mm:3:
2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1402,3): error : /Users/macmini3/Library/Caches/Xamarin/mtbs/builds/ProjectBreatheApp.Maui/c71940fb872bbd0f6ad50d7e444523ad79bb9e154c1d4fa4a69aa86313b02b66/obj/Debug/net8.0-ios/ios-arm64/linker-cache/registrar.h:25:9: fatal error: 'ThreadNetwork/THClient.h' file not found
2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1402,3): error : #import <ThreadNetwork/THClient.h>
2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1402,3): error : ^~~~~~~~~~~~~~~~~~~~~~~~~~
2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1402,3): error : 1 error generated.
2>Done building project "ProjectBreatheApp.Maui.csproj" -- FAILED.
If i then switch to Remote Devices - My iPhone I get
1>Tool xcrun execution finished (exit code = 1).
1>ld: building for iOS, but linking in object file built for iOS Simulator, file '/Users/macmini3/Library/Caches/Xamarin/mtbs/builds/ProjectBreatheApp.Maui/c71940fb872bbd0f6ad50d7e444523ad79bb9e154c1d4fa4a69aa86313b02b66/obj/Debug/net8.0-ios/ios-arm64/nativelibraries/aot-output/arm64/System.Private.CoreLib.dll.o'
1>clang: error: linker command failed with exit code 1 (use -v to see invocation)
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1559,3): error : clang++ exited with code 1:
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1559,3): error : ld: building for iOS, but linking in object file built for iOS Simulator, file '/Users/macmini3/Library/Caches/Xamarin/mtbs/builds/ProjectBreatheApp.Maui/c71940fb872bbd0f6ad50d7e444523ad79bb9e154c1d4fa4a69aa86313b02b66/obj/Debug/net8.0-ios/ios-arm64/nativelibraries/aot-output/arm64/System.Private.CoreLib.dll.o'
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets(1559,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation)
1>Done building project "ProjectBreatheApp.Maui.csproj" -- FAILED.
Note it still says "iOS Simulator" what???
Then I run Clean and I get a deployment but trying to run it I get "The app cannot be installed because its integrity could not be verified"
Then I try and deply again and I get
Error error MT1045: Failed to execute 'devicectl': 'devicectl -j /var/folders/yt/ft5mvm_97pv8r6q5ygh3ddn80000gn/T/tmpTvVGpF.tmp device install app --device iPhone /Users/macmini3/Library/Caches/Xamarin/mtbs/builds/ProjectBreatheApp.Maui/c71940fb872bbd0f6ad50d7e444523ad79bb9e154c1d4fa4a69aa86313b02b66/bin/Debug/net8.0-ios/ios-arm64/device-builds/iphone12.3-17.4.1/ProjectBreatheApp.Maui.app' returned the exit code 1. 0
I have tried various combinations of
Bundle Signing Scheme, Signing Identity and Provisioning Profile