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>