Problem:
At some point I noticed my iOS app with an iOS Share Extension can't launch on iOS simulator.
The main error message was this:
Your target is built for iOS but contains embedded content built for the iOS platform (...-share.appex), which is not allowed
The full error message:
ValidateEmbeddedBinary /Users/olehkopyl/Library/Developer/Xcode/DerivedData/instagram-downloader-eyyoimtlrlmitkcsgtcfdwmtarnt/Build/Products/Debug-iphonesimulator/instagram-downloader.app/PlugIns/instagram-downloader-share.appex (in target 'instagram-downloader' from project 'instagram-downloader')
cd /Users/olehkopyl/Dropbox/Development/Swift/iOS/instagram-downloader
/Applications/Xcode.app/Contents/Developer/usr/bin/embeddedBinaryValidationUtility /Users/olehkopyl/Library/Developer/Xcode/DerivedData/instagram-downloader-eyyoimtlrlmitkcsgtcfdwmtarnt/Build/Products/Debug-iphonesimulator/instagram-downloader.app/PlugIns/instagram-downloader-share.appex -signing-cert - -info-plist-path /Users/olehkopyl/Library/Developer/Xcode/DerivedData/instagram-downloader-eyyoimtlrlmitkcsgtcfdwmtarnt/Build/Products/Debug-iphonesimulator/instagram-downloader.app/Info.plist
error: Your target is built for iOS but contains embedded content built for the iOS platform (instagram-downloader-share.appex), which is not allowed.
Problem:
At some point I noticed my iOS app with an iOS Share Extension can't launch on iOS simulator.
The main error message was this:
Your target is built for iOS but contains embedded content built for the iOS platform (...-share.appex), which is not allowed
The full error message:
ValidateEmbeddedBinary /Users/olehkopyl/Library/Developer/Xcode/DerivedData/instagram-downloader-eyyoimtlrlmitkcsgtcfdwmtarnt/Build/Products/Debug-iphonesimulator/instagram-downloader.app/PlugIns/instagram-downloader-share.appex (in target 'instagram-downloader' from project 'instagram-downloader')
cd /Users/olehkopyl/Dropbox/Development/Swift/iOS/instagram-downloader
/Applications/Xcode.app/Contents/Developer/usr/bin/embeddedBinaryValidationUtility /Users/olehkopyl/Library/Developer/Xcode/DerivedData/instagram-downloader-eyyoimtlrlmitkcsgtcfdwmtarnt/Build/Products/Debug-iphonesimulator/instagram-downloader.app/PlugIns/instagram-downloader-share.appex -signing-cert - -info-plist-path /Users/olehkopyl/Library/Developer/Xcode/DerivedData/instagram-downloader-eyyoimtlrlmitkcsgtcfdwmtarnt/Build/Products/Debug-iphonesimulator/instagram-downloader.app/Info.plist
error: Your target is built for iOS but contains embedded content built for the iOS platform (instagram-downloader-share.appex), which is not allowed.
Share
Improve this question
edited Feb 16 at 18:38
HangarRash
15.1k5 gold badges19 silver badges55 bronze badges
asked Feb 16 at 17:32
Oleh KopylOleh Kopyl
94 bronze badges
2
- In XCode, Build Phase: moving the "Embed Foundation Extensions" build phase to above "Run Script" solved the issue. – Varinder Singh iPhone Dev Commented Feb 17 at 7:31
- @VarinderSinghiPhoneDev than you :) I'm wondering why does your answer appears as a comment and not as an answer... – Oleh Kopyl Commented Feb 18 at 17:16
1 Answer
Reset to default 0Solution:
I went to my main app target settings (not Share Extension's target settings) -> Info tab -> Removed CFBundleSupportedPlatforms
key.