In image asset editor we can add launch image but it'll not appear in devices I can say atleast iPhone devices but If you ignore to add LaunchImage in assets xamarin won't let you compile the app.so you have to add the LaunchImage and at the same time you have to have Launch Screen.storyboard Why is this anomaly ? and how to keep on using static images
I have created separate imageset in asset library and added a image view in launch screen and referred that newly added imageset but its not working screen appears empty
It's not a Xamarin problem, but iOS itself.
Launch image required for iOS version lower than 8.0. So if you want to support them, you need to add all images in to assets.
LaunchStoryboard you can use for all iOS version above 8.0 (included). It will stretch out automatically for each device.
You can select most appropriate solution for your project in Info.plist
Related
I've got a Xamarin.Forms Project containing an Android and an iOS Platform Project.
I've got my whole application working on Android and I am now struggling on the iOS part. I can't get my images to display on iOS.
I've followed the Microsoft guide on how to work with images on Xamarin.iOS, but it's simply not working.
I have created a minimum example from a new project and uploaded it to GitHub, it can be found here.
Output: On Android, the image is being displayed fine, on iOS, the screen stays empty. In addition to that, the logs I've added to AppDelegate.cs show, that the images cannot be found by using UIImage.FromBundle()
I've also checked the CSProject file of the iOS project, but it already contains the <ImageAsset> item groups.
I am on Visual Studio Professional 2022 (Windows) Version 17.4.1
Can someone please have a look into this? I am going crazy...
I have test your project with the Visual Studio 2022 for mac. And I had the same results in the Android platform and ios platform. The small car icon will show at the top of the screen.
But for the iphone 14 pro simulator, which has a notch screen. The car icon almost be covered. So you can try to run it on the ipad or a device without notch screen to check the car icon will show or not.
In addition, I have checked your Assets.xcassets folder and the official sample on the github. There is no a such xxx_vector folder in it.
Background information:
What's deprecated (but still works) is individual resource files (aaa.png, aaa#x2.png), with no xcasset.
An xcasset containing those files is not deprecated. Nor is it likely to become deprecated in the future.
If you still want to test with .pdf containing vectors:
What is problematic about your setup is that you have TWO representations of car_settings. One with .pngs, one with vector pdf.
What happens if you remove the xcasset with .pngs, and rename the one with pdf to match the filename in it? (car_settings xcasset, with car_settings.pdf).
Close VS, and delete all .bin and .obj folders after making this change, to ensure VS correctly rebuilds with the vector version.
If this still fails, then you likely have encountered a bug. Add as an issue at github xamarin forms issues. Be sure to mention the versions of VS and Xamarin.Forms that has the problem.
When I build my titanium app in appcelerator, the app icon is missing from the organiser when I build it for app store submission
How can I resolve this thanks
Edit:
In itunes connect, this is how it appears after I select the build:
Icon is missing.
Yes we need to have the iTunesArtwork(512X512) and iTunesArtwork#2x(1024X1024) in the folder Resource->iphone-> here we need to have that 2 files.
I've met the same problem recently. I don't know the real reason behind that, but I find that if I change the extension of the image file directly from jpg to png, the AppIcon will not show in the organizer. However, if I open the image with the preview application, export png version of the image and add it to Xcode, the AppIcon will show in the organizer.
Hope this will be helpful for you.
Do you have the iTunesArtwork and iTunesArtwork#2x images in the root of your Titanium project? They are simply png images without the extension. They go in the same folder as the tiapp.xml.
Check alpha channel for all app icons. If alpha channel is exist then just remove alpha channel and then try it.
Thanks
For iOS Only
If you are using Ti SDK >= 5.0.0 GA you must make an Icon called DefaultIcon.png and Ti will make all icons you want automatically !.
You are recommended to add a 1024 x 1024 PNG image, named DefaultIcon.png placed in the project's root folder, which is used to generate all or only omitted icons for the project. New Titanium projects will have the DefaultIcon.png file.
Reference https://docs.appcelerator.com/platform/release-notes/?version=5.0.0.GA
For iOS and Android http://ticons.fokkezb.nl/ it`s awesome tool from https://stackoverflow.com/users/4626813/fokke-zandbergen
iPad Pro requires 167x167 App icon and 2732 x 2048 (landscape) launch image. But where should I put them? Xcode 7.1 Asset Catalogs don't provide any place to add iPad Pro specific icons or images.
My launch image is size specific, so using storyboard for this isn't a good option.
Apple commented on this issue: "Latest beta (7.2b3) added 83.5#2x app icon slot to asset catalogs, and Developer relations reported in a radar comment that they no longer support launch images and will not be adding the iPad pro launch image size to asset catalogs."
Taken from here.
Use Launch Screen storyboard.
You can also disable Launch Screen File and Launch Images Source from project General settings and use the old way - define all Launch Images in Info.plist.
Info.plist:
<key>UILaunchImages</key>
<array>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageName</key>
<string>DefaultPro-Landscape</string>
<key>UILaunchImageOrientation</key>
<string>Landscape</string>
<key>UILaunchImageSize</key>
<string>{1366, 1024}</string>
</dict>
...
</array>
More info about UILaunchImages in Info.plist in this post:
How do I create launch images for iPhone 6 / 6 Plus Landscape Only Apps?
You should use Launch Screen Files for iPad Pro instead of Launch Images.
First, from iPad Pro, iOS don't support Launch Images, so you can not find the right sizes for iPad Pro's launch images in Xcode 7.1.
Second, if you don't use Launch Screen File, you app running on iPad Pro will be scaled, which is so called 'Display Zoom'.
It looks like you'll need to use the Launch Screen storyboard or xib file to support launch screens specific for iPad Pro.
Per Apple, you should be able to use both the launch image assets to support pre-iOS8, and the Launch Screen file for iOS8+. From the Apple App Distribution Guide :
"For iOS 7 deployment targets, you can supply both a launch screen file and launch images. In iOS 8, the launch screen file is used, and in iOS 7, the launch images are used."
also these docs state:
"If you also need to support earlier versions of iOS, you can continue to supply static launch images in addition to a launch file."
However, in my case even though I have a LaunchScreen.storyboard file, it isn't getting used when I have launch images in an asset catalog. i.e.: I always see the asset catalog launch images instead of the launch screen. I verified the Launch Screen file is set in the info.plist and that it has the "Use as Launch Screen" flag set. I'm also using size classes and auto layout.
If you don't find the "wells" where to put the icons in asset catalogue, perhaps you changed your App settings from iPhone to iPad at a later point and then the iPad "wells" are not visible. You can turn them on by doing this:
The set will only contain image wells for icons that are relevant depending upon your project's configuration at the time the asset catalog was created. If an image well is missing, expand the settings inspector and check the appropriate boxes under the App Icon pane depending upon your project's deployment target and supported devices.
When I try to publish my app to the app store, it shows me two errors:
First: Missing required icon, the bundle does not contain an app icon for iphone/ipod of exactly 57x57 in png format for iOS version <7
Second: Your binary is not optimized for iphone5 - new iPhone apps and app updates submitted must support the 4 inch display on iPhone 5
Does my icon need to be 57x57 or can I use any size and the system will resize it for me?
thanks.
Yes, you need a 57x57 png in your build. I would recommend reading the iOS Human Interface Guidelines: App Icons material.
When u publishing an app icon you shouldn't use transparency it is forbidden apple does it for u automatically.
When you changed png to jpg the background became white , and solved your problem retroactively:-)
I actually found a solution for that.
Whenever you added icon to the image asset, but it's not showing after you archive the app, its because xcode requires jpg image, if you only change the extension .png to .jpg, it won't work.
Took me awhile to found out.
I get this issue when building UI in storyboard (or xib) in xcode's interface builder. After I assign the image (with the same name in asset catalog) to an image view in Interface Builder, the xcode loads 3x image file instead of 2x in any non-retinahd devices which is running ios8.
Note that this bug only happens when app's deployment target is set to 6.0 or 6.1.
I'm using asset catalog to manage image resources.
This issue is tested and happens both in Xcode 6.0.1 and 6.1 GM seed 2.
I googled the issue and could rarely find the related topic. So I wonder if any one gets the same issue with me and what is the best workaround for it. Thank you.
The following is the steps to reproduce this issue in case anyone has the interest:
Install Xcode 6
Create an iOS project and set to use objective-c as project language.
Change the app's deployment target to 6.0 or 6.1.
Add 1x, 2x and 3x version of an image to the asset catalog.
In interface builder, add a UIImageView to the default view controller's view of default storyboard.
In interface builder, set the image's name as the same image name added in step 4 in asset catalog.
Select the simulator as iPhone6 (or any simulator runs on iOS 8.0 except iPhone6 Plus).
Clean the project (Product/Clean).
Run the project.
UPDATE:
As #Andrei Mankevich mentioned in the comment, this bug seems to be fixed in iOS 8.1.
And I have confirmed it using the simulator running iOS 8.1 in Xcode 6.1 GM seed 2(sorry I don't have a real device running iOS 8.1 currently).
So as #Andrei Mankevich pointed out, this bug might only exist in iOS 8.0.x.
After some research it looks like this issue is related to iOS indeed and so it isn't likely to be fixed by upcoming Xcode update. That's what documentation says about Asset Catalog:
For projects with a deployment target of at least iOS 7 or OS X 10.9, Xcode compiles your asset catalogs into a runtime binary file format that reduces the download time for your app.
So when we use deployment target 6.0 resources are just stored in different way inside IPA file. While iOS 8.0 is loading compiled resouces correctly, it has the issue with loading non-compiled resources and always loads 3x density images. And this issue was already fixed in iOS 8.1.
As for possible workaround in our app we fixed it by setting exact size of each element in xib and using UIViewContentModeScaleAspectFit value for contentMode flag . We use the same image resources with just different resolution so after scale they also look the same. But of course it should have negative impact on performance.