Today Extension (Widget) not getting updated during app update - ios

I have an app in appstore containing a widget and it works fine. Now when i tried to give an update for the existing widget and tried over installing through Xcode, the app gets updated , but the widget is not getting replaced with the new version. Please provide a solution.

I had the same problem.
First install a older version
Open it container app, and drop down the today view
Then install the new one
Drop down today view again
It just keeping the old style
After that, I debug the today widget through Xcode
First time, Xcode report a error with some message lick "Lost connection"
Stop debug
Run debug again
The today view drop down automatically and then become the new version style
I wish it would be all right when submit to AppStore just like you said. :(

Related

My widget doesn't seem to install onto my Xcode 12 simulator

I have a SwiftUI iOS app that builds and runs perfectly on the Xcode Simulator. I'm trying to create a widget for my app. I create a new Widget Extension target successfully, and without modifying any of the stock template code, I try to run my extension target.
The widget extension builds successfully, and Xcode tells me the extension is running, but no widget appears in my simulator. I checked the "add widget" list and it isn't there either.
I've tried making a widget without having the "Include Configuration Intent" checked, I've made sure that I'm running my app and widget extension on the same device (and I've tried different devices, iPhone 11, iPhone 12, etc.), I've tried uninstalling the app and rebuilding the project... I'm not sure what I'm missing here!
Any help would be greatly appreciated.
I'm on a late 2013 MacBook Pro, running MacOS Big Sur 11.5.2, and using XCode 12.5.1. I am not a paying Apple Developer member (if that makes a difference). I'm sorry if I'm leaving some important information out, I didn't know what to include so please let me know if you have any questions.
Thanks so much for your help in advance!
Go to your mainTarget > Build Phases.
Under Embed App Extensions, uncheck "Copy only when installing"
The thing is, you want to see your widget getting copied over in all sessions, not just for the Production Profile.
Build again and you should see your widget now.
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...

Parse error "Could not build module 'UIKit'" but the app runs fine

I created a new project in Xcode 11, the "Single View app" in objective C. In every class the line #import <UIKit/UIKit.h> is highlighted in red, with the message "Could not build module 'UIKit.'" However the app builds and runs with no problem.
I've read a lot of questions like this on SO from years back, but none with XCode 11 and it doesn't sound like any of them would build without breaking. For me it is purely a parsing issue.
I tried deleting derived data, and I reinstalled XCode multiple times. The last time I went through this tutorial for completely erasing XCode from my computer: https://macpaw.com/how-to/uninstall-xcode-on-macos
Through the rest of the day the issue seemed to be gone. But this morning it's back again.
This seems to be happening with any XCode project I have, including brand new ones with no code changes.
I would just ignore the "errors" but it keeps me from being able to use autocomplete which slows down my workflow a lot.
Update
This issue seems to have gone away. I'm not sure why but I'm happy for it.
Update
This issue came back again after updating my computer. I have not been able to update Xcode for a while not. I'm not sure if the issue is related
Update
I was able to update Xcode, and the issue went away again.
I updated my Mac to Catalina 10.15.1 and was able to update Xcode to 11.2. After this the parse error discontinued and all of my syntax highlighting is back to normal.

ios 11 - wrong update button in App Store

I have an issue related to update new version in iOS 11.
I have created a function to detect new version and prompt user to update via configuration file. This function works perfect so far.
But after upgrading to iOS 11, when I tap on Update Now of alert popup, then AppStore is opened, the status of button is Open instead of Update, even thought current version of app on AppStore is 2.0 and current version of app in device is 1.0 !?!
I guest user has opened App Store previously and AppStore has cached content for next use. Finally, the bug is occurred! This is just my thinking!
If you got this issue or you have any ideas on this issue. Please share with me.
Thanks,
Ryan
Sometimes it also happened to me. when an app is updated, and I can not install the latest version, it shows me OPEN not UPDATE on AppStore, and I have to uninstall the app, download new app on AppStore, and it is the latest version.
I think the reason why we can not download the lastest app version is AppStore needs time to update its database, or maybe it has cache or somthing.

“Unable to Load” message in Today's Widget in iOS 11

On all my test devices and simulators running iOS 11 my widgets failing to load. Just a message in the center "Unable to load". Not visible "Show more"/"Show less" also. Cannot open the app when tap on the widget.
On all iOS 10.x.x devices/simulators everything is fine.
Tried restart devices, delete app and install again from the App Store. Tried remove widget and add again. Tried with new build of the app using last Xcode (9.0), without success.
Any assumptions?
Finally I found the reason..
Here Apple Developer Guide I found this for the widget's plist.file:
"If you don’t want to use the storyboard file provided by the template, remove the NSExtensionMainStoryboard key and add the NSExtensionPrincipalClass key, using the name of your view controller for the value."
So, when I remove NSExtensionMainStoryboard key, works in iOS 11, no "Unable to load" message, the widget looks good, when tap on the widget, my app starts.

Launch/Spash image does not change with Upgrade

In the next version of my iOS application, I modified the Default.png image. The new image (now localized) is featured prominently throughout the application.
To test the upgrade process on my device, initiate the installation from Xcode on a device that has previous version of the application. My problem is that during this mock upgrade, the splash image appears as the old Default.png. Additionally, when displaying Default.png elsewhere in the application, it also continues to be the old one.
However, if I first remove the application from the device, and afterwards install (rather than upgrade), the new splash image does appear properly.
How do I fix this, or is this to be expected when mock upgrading via Xcode? Can/Should I rely on the upgrade process executing properly when it happens through the app store?
The closest question seems to be this:
Updated splash / launch not working
The answer, though sounding great, seems speculative.
Thanks in advance.
I contacted Apple and they sent me the following:
https://developer.apple.com/library/ios/#technotes/tn2285/_index.html
It explains:
How to properly test for updates
That during an 'Xcode update' not all assets get refreshed
When properly testing the upgrade, assets do get replaced as they should
Long story short, test upgrades properly and things will appear as they should.
Here are a few things to try (not guarantees but worth a shot):
Delete the Derived Data for your project. Go to the Window menu at the top, click organizer, click the projects tab at the top, select your project and click the "Delete" button next to "Derived Data".
Clean your project. Product menu then "Clean" option.
Make sure that the old default image has been deleted from it's location in the file system (sometimes Xcode says it deleted something, but in actuality the file is still there on the file system).

Resources