Make sidebar widget transparent on macOS Mojave - swift

I have two apps for macOS Mojave that come with an extension for the sidebar.
I have noticed that the app extension looks different in the Widget Simulator and the sidebar. When the app runs in the Widget Simulator, the background has some transparency. When I run the app normally, there is no such transparency. I have attached two screenshots:
As you can see, the app has no transparency (compare to the calculator app of macOS).
The second screenshot shows the app running in the simulator with transparency.
Are there any options that I have to set to make it transparent? Is there a new type if NSView descendant? The title bar is also different, so I don't think it is enough to simply set the background color to "clear". The latest version of the app is built for 10.14 only, so I don't care if the solution is only available for macOS Mojave.
I have checked, that the widget inherits the appearance of the super view/window. I did not change any other properties. I also tried using a NSVisualEffectView with various settings, but this also did not solve the problem.
Regards

I just found a solution in the Apple Developer forums:
Apple Developer Forum
In the info.plist file of the extension, there is a section called NSExtension. In there, the NSExtensionAttributes/NSExtensionPointVersion had to be incremented (was 2.0, now is 3.0).
Now the app extension looks nice:

Related

Setting little app icon in iOS in .NET MAUI app

All the app icons in my .NET MAUI app seem to work correctly, except for this little guy on iOS. You see this icon when you swipe up to see all the open apps.
I guess, somehow I'm missing this but I uploaded all the icons with different sizes Apple requires for iOS apps. Which one is this icon and how do I make sure I'm giving Apple my app's icon for this particular size so it doesn't default to the .NET icon?
Yes,this is often the case when you are using images that are not formatted correctly or are very complex. And I've had similar problems before.
Vector graphics are highly recommended in ios.

UIButton has strange unexpected bakground color on different device

I've recently been building an app under iOS 15 (latest as of writing this code), and when I shipped a version of my app to test flight, one of my users sent me a video of the app working, and I noticed, all of my buttons have this strange background highlight effect. Is this some sort of accessibility mode? I've never seen this happen before. In included some screenshots below and the interface builder, there are no custom classes associated to this UIButton. And ALL of the buttons have this effect happening to them.
This other device has a strange background color attached:
But this is how its designed and how it shows up on my device and the simulator:
Here is a screenshot from Interface Builder:
I had a similar problem.
Change the style to default.
And then instead of the tint color, choose the text color.
The background can remain default.. and is therefore transparency.
Tested, works.
Example
Turns out my user had something in iOS accessibility settings turned on, called "Button Shapes". I had no idea...

ios11 iphone app icon is missing on iPad

I have an iPhone only app but it works in compatibility mode in the iPad too(no surprises).
but after I updated the app for the ios11, app icon on the iPad is missing.
here is what I've tried;
- launch on the iPhone simulator, icon appears
- launch on the iPad simulator, icon is missing
change the device options from "iphone" to "universal", run the iPad simulator, icon appears but app needs a new iPad ui.
change back to "iPhone" and the app icon is missing again in iPad. really confusing.
I tried to create a new project and make the same changes but never able to make the icon missing again.
I'm using cocoa pods if that makes any sense.
I think I'm missing a settings or something else, I'm really trying to find it, any advice would be greatly appreciated.
I've found the problem.
In info.plist, there was an extra or problematic entry.
- CFBundleIcons~ipad
Remove this line and iPad icons appear normally.
This problem has been reported by many users over the past 6 months (including desperate pleas to Apple to fix this bug), yet no one's reported the following solution.
I'm using Xcode 9.2, and I noticed today that my iPad/iPhone's application will run fine on my iPad (iOS v11.2.1) but the icon is missing.
This is a legacy app, about 2-3 years old, and the cause seems to be my Appicon file. When I view this file, I see this:
Previously, this resource was sufficient to provide the app icon for both the iPad and iPhone, but apparently, not anymore.
I went into my Images.xcassets file, right-clicked, and selected "App Icons & Launch Images\New IOS App Icon" and now have a look at the extra icon possibilities:
Notice the extra icons for iPads.
Sure enough, I created yet more .png files, with resolutions matching the desired iPad resolutions settings, and now, when I build my app and run it on the iPad, it does show the correct icon.
Oh, and I also needed to go into my project's build settings, select the "General" tab, and change the "App Icons Source" to the name of my new image set, "AppIconNew".
Et voila. No messing around with Cocoapods, no need to change the .plist file (mine didn't have that "CFBundleIcons~ipad" entry anyway), I just needed to create a new image set.
Okay, time to go back to my modern, cosy world of using Visual Studio again now.
(Happy sigh..)
I've had a few legacy apps that did have the CFBundleIcons~ipad in the Info.plist, so I check that first. However, I've also had instances where it was just missing the asset as #Mike Gledhill mentioned. If this is the case, you don't have to go through adding a new AppIcon set. Just check the iPad box in the Attributes Inspector for the current AppIcon assets and the iPad sizes will show in the current set. Then just add the correct assets for each size requirement.
I didn't have CFBundleIcons~ipad entry in my Info.plist file as per "karpat"s answer. So I moved to "Mike Gledhill"s answer, then after observing my all the icons from Image assests, I found that for particular icon which was invisible only on iPad, the device type set was iPhone.
I just changed device type by right cling on image set to Universal :
This did work for me.

Xcode Create a working app for iOS 5.1 with xcode 4.6

i can run my app on my 6.1 iOS but can't with 5.1
i have the iOS Deployment Target set to 5.1 on both Project and Target
when i run the simulation for 5.1 it works fine but when i try it on my iPhone it crash's
i committed out all my code thinking that was the problem but the same thing keeps happening
XIB and auto-layout is not enabled
The iPhone simulation works with no errors
I tried to create a new project and have only a label and i still get the same out come
can some one send a link to a single view project that works with 5.1, the program could be blank i just want to compare to mine to see what is different/ wrong.
Sounds like you might be trying to use an API that is specific to iOS6 (UICollectionView or something similar).
You need to plug the device in and run it and see what the console indicates is the problem.
You have Auto Layout turned on for ViewController.xib. There are two ways to work around this. Either disable Auto Layout on that xib:
1) Xcode 4.3 not presenting Autoresizing panel in Size Inspector
Or use one of many methods to enable auto layout while remaining backwards compatible:
2) Enabling auto layout in iOS 6 while remaining backwards compatible with iOS 5

How to get iOS to properly respect the "apple-touch-icon-precomposed" link attribute for a "web app"

I have created several web apps for iOS that employ the apple-touch-icon-precomposed link attribute method for custom home screen icons without the gloss. However, I have run into an issue recently, where, after adding the home screen bookmark and then running the app and exiting the app (via multitasking), gloss is applied to the icon! I don't understand why this happens. I can't reproduce it on an iPad 2, but this keeps happening on my iPhone 3GS running 4.3.3. Also, it seems that it might have something to do with putting it in a folder?
The app is located at http://pattern86.com/apps/color if you'd like to inspect the code.
Basically this is what happens:
Add the app to the home screen. (No gloss--everything's good at this point.)
Quit the app from multitasking (It already shows the gloss here!)
Now the icon has the gloss effect! What gives?
(reposting as an answer, as requested:)
Could be something to do with the icon itself. Does the image have an alpha channel? Do your other, working, apps’?