FreedomOfSpeech
FreedomOfSpeech

Reputation: 415

Xamarin iOS Tool exited with code1: Output: ditto: Can't get real path for source

I added a Notification Service Extension project to my Xamarin project. Then I added a reference to it in the Xamarin main iOS project. When building i get this error:

Severity Code Description Project File Line Suppression State Error Tool exited with code: 1. Output: ditto: can't get real path for source '../../NotifServiceExtension/ac83d35a0ee368097132b3463a52c5b0/bin/iPhone/Debug/NotifServiceExtension.appex' SARR1.iOS

Any ideas please?

Upvotes: 2

Views: 4966

Answers (3)

Anders Gustafsson
Anders Gustafsson

Reputation: 15981

Please check if the flag <DeviceSpecificBuild> is set to true in the extension project for the configuration you are trying to build. If it is, change the flag to false. Now the app build should succeed, with the extension included.

Upvotes: 7

FreedomOfSpeech
FreedomOfSpeech

Reputation: 415

I figured it out.

Like @LucasZ said, remove the reference to the iOS app extension (in my case Notification Service Extension) from the host iOS project WHEN you want to build the project in DEBUG mode.

Add the iOS Extension reference to the host iOS Xamarin iOS project when you build in RELEASE mode.

For some reason you cant have the iOS project reference an iOS Extension project when you build in DEBUG mode. It will give the above error as of the current version of Visual Studio with Xamarin.

When in RELEASE mode, make sure you start the project with "without debugging".

Upvotes: 2

Lucas Zhang
Lucas Zhang

Reputation: 18861

Try to remove Notification Service Extension and add it again

Upvotes: 2

Related Questions