xcode 6 beta 7:A signed resource has been added modified or deleted.
Asked Answered
D

3

12

When I'm running the application on device aftercleaning, removing derived data, first time it runs without any issues. Second time when I'm trying to run, it say's "A signed resource has been added modified or deleted."

On the simulator app run's without problem.

I think it's because of extensions, I have editing, share and today extensions, when I'm deleting this extensions, then I can run second time without this message.

The problem has been since from xcode 6 beta 5.

Maybe issue related to provisioning profiles and signing ? I has created different provisioning profiles for each extension target.

So my question is, how can I fix this ? How can I run on the device second time without cleaning project?

Dateless answered 3/9, 2014 at 8:4 Comment(2)
When removing my extension targets, there is no such a problem.Dateless
When removed all extension targets that contains swift code it's started working normally. I think it's a bug in xcode, for now if we have extension with swift code, don't know why, but second time run gives "A signed resource has been added modified or deleted." error.Dateless
D
5

Edit: There is an another workaround: for each extension target containing .swift file, add build pre-action in project running scheme configuration:

touch "${PROJECT_DIR}/SOME SWIFT FILE IN EXTENSION.SWIFT"

So I've found a workaround for this issue. For now we can't have swift code in extensions. As mentioned in the comment

When removed all extension targets that contains swift code it's started working normally. I think it's a bug in xcode, for now if we have extension with swift code, don't know why, but second time run gives "A signed resource has been added modified or deleted." error.

Dateless answered 7/9, 2014 at 6:8 Comment(3)
This solved it for me. I had a today extension with multiple swift files in it. I did have to add the extension folder name after the PROJECT_DIR though.Snooker
Works perfectly for Obj-C extensions as wellFraxinella
Thank you! This works for Xcode 6.2 with an ObjC extension. Had to add a run script to my extension target. I was usually not getting the error in the title. The app would just not run unless I cleaned, and Xcode would say "Finished running."Divided
D
21

It is still not fixed in XCode 6 RTM. But I found an easy walk around. Simply delete the ShareExtension.appex folder under your build. Then rebuild again. You don't need to clean project, so rebuild is quite fast.

A actually alias the command to do the cleaning

rm -rf ~/Library/Developer/Xcode/DerivedData/<your_app>-*/Build/Products/Debug-iphoneos/ShareExtension.appex/
Deicide answered 26/9, 2014 at 7:9 Comment(2)
Yes, so this removes the app extension from the build. But what if you want the app extension to end up on your device?!Declamatory
You need to be awarded a dragon!Hardecanute
J
6

I used a slight modification of Cloud Xu's script to delete both the .appex and .appex.dSYM

rm -rf ~/Library/Developer/Xcode/DerivedData/YourAppName-*/Build/Products/Debug-iphoneos/com.yourcompany.Name.extension.*

You can put this in your scheme so that it executes with every build:

Edit scheme... > Expand the Run mode in the sidebar > Pre-actions > Click '+' > New Run Script Action.

Jemine answered 30/10, 2014 at 0:37 Comment(0)
D
5

Edit: There is an another workaround: for each extension target containing .swift file, add build pre-action in project running scheme configuration:

touch "${PROJECT_DIR}/SOME SWIFT FILE IN EXTENSION.SWIFT"

So I've found a workaround for this issue. For now we can't have swift code in extensions. As mentioned in the comment

When removed all extension targets that contains swift code it's started working normally. I think it's a bug in xcode, for now if we have extension with swift code, don't know why, but second time run gives "A signed resource has been added modified or deleted." error.

Dateless answered 7/9, 2014 at 6:8 Comment(3)
This solved it for me. I had a today extension with multiple swift files in it. I did have to add the extension folder name after the PROJECT_DIR though.Snooker
Works perfectly for Obj-C extensions as wellFraxinella
Thank you! This works for Xcode 6.2 with an ObjC extension. Had to add a run script to my extension target. I was usually not getting the error in the title. The app would just not run unless I cleaned, and Xcode would say "Finished running."Divided

© 2022 - 2024 — McMap. All rights reserved.