admin管理员组文章数量:1384692
Introduction of problem
This recently started happening when I added an internal package with shared code across main app and extensions. When I load the simulator by either setting our main app as the target or as the individual extensions, the extensions do not show up on the simulator. When I build and run the share extension to photos, our app's option does not show up to share despite being a potential image share target. When I run the widget extension, the option to add our app's widget does not show up. These were working fine on my partner's devices before I added the shared package. Now it doesn't work on any of our devices
Embedded binary is not signed with the same certificate as the parent app
There is another bug that I've recently stumbled across when I added the shared package. That is Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's. The logs show that this error happens when building the widget extension. This build error goes away when I enable Copy only when installing
The extensions were working just fine before the package was added.
I initially thought it was a signing problem, but then we triple checked and got a proper Apple Development Team with Certs yet it still doesn't work. I've set the internal package as a static package. As a side note, the internal package is not explicitly signed (which I don't know how to do). However it is added as a static library in the Frameworks, Libraries, and Embedded Content section of both main app and extensions (lest the imports don't work)
Below is the Package.swift file of my package
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "TwoCentsInternal",
platforms: [
.iOS(.v18)
],
products: [
.library(
name: "TwoCentsInternal",
type: .static, // <-- This line specifies a static library.
targets: ["TwoCentsInternal"]),
],
dependencies: [
.package(url: ".git", from: "11.9.0")
],
targets: [
.target(
name: "TwoCentsInternal",
dependencies: [
// Specify the Firebase products you need.
.product(name: "FirebaseCore", package: "firebase-ios-sdk"),
.product(name: "FirebaseAuth", package: "firebase-ios-sdk")
]
),
],
swiftLanguageModes: [.v6]
)
Below is are the Info.plists for my Share extension and Widget extension respectively
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ".0.dtd">
<plist version="1.0">
<dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict/>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>5</integer>
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
<integer>5</integer>
<key>NSExtensionActivationSupportsText</key>
<true/>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>1</integer>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
</dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ".0.dtd">
<plist version="1.0">
<dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.widgetkit-extension</string>
</dict>
</dict>
</plist>
本文标签: iosXCode Share and Widget Extensions not working after adding local SPM packageStack Overflow
版权声明:本文标题:ios - XCode Share and Widget Extensions not working after adding local SPM package - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744493212a2608859.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论