最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

iOS Share Extension does not run on iOS simulator, but runs on my iPhone - Stack Overflow

programmeradmin3浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 0

Solution:

I went to my main app target settings (not Share Extension's target settings) -> Info tab -> Removed CFBundleSupportedPlatforms key.

发布评论

评论列表(0)

  1. 暂无评论