iOS Widget Extension: Failed to show Widget on running with widget extension scheme
Well, I finally figured it out and solved this problem.
Letter case turns out to be the culprit.
One thing I haven't mentioned is that my project contains a folder reference name "Plugins" to be packed into the bundle. It contains several JavaScript files used by the app.
Screenshot: How the file tree looks like
Then I noticed that in the "Build Phases" settings, the embedded app extensions are specified "PlugIns" as the default destination, which shares the same name with the "Plugins" folder listed in the "Copy Bundle Resources" if the letter case is ignored.
Screenshot: "Build Phases" settings
After exploring the build folder, I found that the widget extension was placed under the "Plugins" folder instead of the "PlugIns" one. When the widget extension is being launched, the "PlugIns" folder in the bundle is being looked up to find the .appex
extension. The "PlugIns" folder does not exist but the "Plugins" one does in this scenario. And this can also explain why the app works but the extensions do not.
Renaming the folder to be included in the bundle solved my problem.
My widget doesn't seem to install onto my Xcode 12 simulator
Fixed! I did some poking and tried to run the preview canvas for my widget file, it gave me an error saying the preview couldn't be rendered.
Googled it up, found this answer and rebuilt and ran the widget extension again. It still gave this error, so I rebooted the iPhone simulator and voila! It works!
Thanks for the help, hope this helps someone down the road...
When i run app extension(Widget) in device.I got this error App installation failed
If your application bundle identifier is com.companyName.productName then your extension bundle identifier should be com.companyName.productName.extensionName
If you assign the bundle identifier in this way then your provisioning profile will work for both.
After Removing App Extension Still Get App Installation Failed Error- This app contains an app extension with an illegal bundle identifier
I had the same problem. Turns out that you just need to clean the project and the build folder with this shortcut command + option + shift + k
Related Topics
Typecasting or Initialization, Which Is Better in Swift
Smooth Transition Between 2 Scrollviews
Given a Hexadecimal String in Swift, Convert to Hex Value
Define MACos Window Size Using Swiftui
How to Change "Return" Key to "Done" on Keyboard with Swiftui
Class-Only Generic Constraints in Swift
Property Observers for Uiview Bounds and Frame React Differently
Why Can You Assign Non-Optional Values to Optional Types in Swift
Can't Use Concrete Subclass to Implement a Property in Protocol in Swift
What Is the Property Block Declaration Equivalent in Swift of the Following Block Property
Unsafemutablepointer in Swift as Replacement for Properly Sized C Array in Obj-C
Understanding the Userdefaults Register Method
Bounce Rays with Enumeratebodies Alongraystart
How to Represent Magnitude for Mass in Swift
How Use and Run Swift 2.3 on Command Line
Dispatch Group - Cannot Notify to Main Thread
Change Tabview Indicator Swiftui
Count Number of Decimal Places in a Float (Or Decimal) in Swift