A signed resource has been added, modified, or deleted

I have this error ever since I have added a share extension to the iOS project. The error pops up when the xcode is finished building the project and just before it could launch the app on the device. So I traced down the device log for more information and it is as below.


Jul 24 11:04:36 cloudy45mans-iPhone-6 installd[3502] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]


Jul 24 11:04:38 cloudy45mans-iPhone-6 installd[3502] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/Assets.car


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/MPNotification.storyboardc/MPNotificationViewController.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/MPNotification.storyboardc/puo-Hy-QiQ-view-Wch-Xc-Avw.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/MPSurvey.storyboardc/Info.plist


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/MPSurvey.storyboardc/MPSurveyMultipleChoiceQuestionViewController.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/MPSurvey.storyboardc/MPSurveyNavigationController.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/MPSurvey.storyboardc/MPSurveyTextQuestionViewController.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/MPSurvey.storyboardc/RIP-po-dgx-view-cp6-lZ-a9t.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/MPSurvey.storyboardc/V5X-Ik-MvF-view-dcL-M9-gG3.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/MPSurvey.storyboardc/tDf-fb-udT-view-LG7-cL-aRp.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/THDateDay.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: resource modified: /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex/THDatePickerViewController.nib


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: 0x1004a0000 -[MICodeSigningVerifier performValidationWithError:]: 188: Failed to verify code signature of <MIPluginKitPluginBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex identifier = com.present.iphone.shareextension type = App Extension> : 0xe8008017 (Signed resources have been added, removed, or modified)


Jul 24 11:04:39 cloudy45mans-iPhone-6 installd[3502] <Error>: 0x1004a0000 -[MIInstaller performInstallationWithError:]: Verification stage failed


Jul 24 11:04:40 cloudy45mans-iPhone-6 streaming_zip_conduit[3503] <Error>: 0x100384000 __MobileInstallationInstallForLaunchServices_block_invoke240: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of <MIPluginKitPluginBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex identifier = com.present.iphone.shareextension type = App Extension> : 0xe8008017 (Signed resources have been added, removed, or modified)" UserInfo=0x126e25b10 {LibMISErrorNumber=-402620393, LegacyErrorString=ApplicationVerificationFailed, SourceFileLine=188, FunctionName=-[MICodeSigningVerifier performValidationWithError:], NSLocalizedDescription=Failed to verify code signature of <MIPluginKitPluginBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.W3ZgdD/extracted/Payload/Present.app/PlugIns/shareextension.appex identifier = com.present.iphone.shareextension type = App Extension> : 0xe8008017 (Signed resources have been added, removed, or modified)}

The problem seems to be that extension targets that contain swift code aren't being handled properly.

There's a workaround for this given in stackoverflow:


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

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


Or, alternatively:

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

You need to add either of these, making adjustments for your particular project of course, here:

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


It doesn't solve the underlying issue, but perhaps Apple will if they recieve bug reports.

A signed resource has been added, modified, or deleted
 
 
Q