universal application weight - xcode

I developed my app for Ipad, now I should adapt it for Iphone. My app is quite heavy with a lot of images that should be available offline. These images are located in xib files and are sometimes loaded dynamically from app bundle. I need to limit the size of my app.
should I make a universal app or two different apps (each one with its own set of images optimized for the device)?
If I do a single universal app can I dynamically resize my "dynamically loaded images" in code. what should I do for the images in xibs?

I finally found my answer, one app with different xib sharing the same view controllers.
To limit the weight :
Some images must be modified (eg: backgrounds) because they need to
be adapted to the iphone screen resolution. I just named them
image~iphone.png. The cool thing is that you dont need to modify
images'name in xib or code because the ~iphone signifies image for
the iphone.
Some others can remain the same (eg: buttons) and I'll just size them
down in the IB.

Related

How to add a quick and dirty, default/dummy icon to Xcode AppIcon asset class?

My app doesn't upload to App Store Connect, for TestFlight, because app store icon is missing (see below error).
What's the fastest way to populate the AppIcon asset class, to solve this?
I don't care what the icon is; this is only an internal test app.
ITMS-90713: Missing Info.plist value - A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'com.company.KPdiag9May2022b'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key.
As far as I know, you don't need to add an icon images to all the size in the asset catalogue. You just need to add one image and Apple's OS will take care of scaling for the rest. Not ideal for those who like to control every pixels in their apps but as you've said, it's for internal testing and you don't care if it even have an icon. Try to add an image for the largest size. It's the 1024x1024 # 1x size. I don't believe the upload process will check if all the image size is populated in your AppIcon asset.
That's the fastest way I know.
I found the fastest solution:
3 clicks and a quick and 'clean' app store icon was ready to drag to the Xcode project -- took 1 minute.
App store icon generator
https://jpmallow.github.io/CopiCon/#/dashboard

How Can I Choose An Image From My Xamarin Resources?

I have an image but I want to use a image from my resources folder, I drag and drop that image into the resources folder, and I see that inside it have more folders, can someone explain me also for what is one of this subfolders?
For Android:
..\Resources\drawable
However there are multiple folders inside resources to handle different resolutions. If you want to provide different resolutions do so. Otherwise the resource in drawable will be used.
For iOS:
..\Resources\
Make sure to provide #2x to support retina display.
For UWP:
store images in root folder
iOS, Android, and UWP include support for different image resolutions, where the operating system chooses the appropriate image at runtime based on the device's capabilities.
For android :
You need to put your images in resources/drawable/, every application should have alternative drawable resources for different screen densities. You should have images with the same filename in the different drawable-xxx folder.
This article will help you.
For UWP:
You must place your images in \Assets\Images. You can provide variants of an image resource by creating folders for different scales :
Assets\Images\scale-100\img.png
Assets\Images\scale-200\img.png
Assets\Images\scale-600\img.png
This article will help you understand.
For iOS :
Here you have everything

Xamarin - how to center a launch screen image (iOS)?

I'm using Xamarin for Visual Studio, and am getting frustrated trying to do what I would think should be a very simple thing: creating a launch (splash) screen for iOS, that has a single image that is centered on the screen (vertically and horizontally centered).
I'm creating it the recommended way, using a storyboard (other methods, like using an assets catalog, are considered deprecated as of iOS 9). In the storyboard, I have a View Controller, which contains a View, which contains an Image View. In the Properties pane, I've tried messing with the Mode (in Widget tab), and I've tried playing around with contstraints - which I think might be the key, but it is difficult to understand how it all works together.
You need to add the Splash screen in the applications properties (Launch Images). You need to create the image and upload it via that section. I couldn't find anything saying that the use of Asset catalogues are depreciated.

iPhone 6(s) plus not scaling new application correctly for some users

I have a brand new Swift 2.0 XCode 7 Storyboard based application.
Target is set to 9.2. I'm currently supporting any device with GPS that can run ios 9.2
I started with the Tabbed View Template and I'm working in wAny and hAny and a single Storyboard.
It works fine in the simulator on a bunch of phones, both orientations and works fine on my 6s plus, 6s, 6 plus and a 5.
But for some users the scaling is wrong and everything comes out squished.
Even in landscape mode the TabBar Icons are very close to each other.
Narrower than even on my 6s plus in portrait.
I believe this is caused by my application not having a Launch bitmap.
My understanding is there are two ways to implement this.
Launcher .XIB/.NIB with half a dozen specific sized bitmaps attached. Or a StoryBoard Launcher with ... exactly what.
The "Or StoryBoard" is a little vague. But I wanted to keep things using the modern approach since this app is new and targeted users tend to have the latest device.
So I created my Launch Image set and tried to attached it to the UIImageView in the Launcher StoryBoard. It won't list items that are tagged as "Launcher Image Set". It will show other Image Sets and Icons. But not the ones specifically for Launcher. It shows an "L" in the xcassets list next to the Launcher Image set. I believe I have the build project setting set correctly and it looks perfect on many of the same exact devices.
After some digging, I read that if you use the "StoryBoard" method you don't need the 6 or so bitmaps anymore. You can put anything in the Storyboard Launcher View and treat it just like you would treat your main storyboard.
So I did that. I just centered a small image.png file in the View of the Launchers Storyboard. Works on all simulations and my iPhone 6s plus. I did not pin it to the edges because that would mess up the aspect ratio of the image.
A very small set of users still have the issue and one of them even uninstalled and reinstalled.
I tried playing with setting phone Zoomed, Normal, Text Size, Bold etc. They all work. Users also don't have anything out of the ordinary on these system settings.
So first, do I need the 6 proper sized bitmaps or not? I read conflicting info on this.
If I want to use the 6 images on a storyboard how to I get them in the UIImageView of the Launcher StoryBoard if they won't list? Should I put them in a regular image set. Does the "Launcher Image Set" only work for the for the Launcher.XIB?
If it's not the Launcher window, what else could it be causing this?
I know I could create a XIB/NIB with the 6 bitmaps. But that seems like I'm going backwards and I don't care about old OS versions or older phones.
I think I found my answer. When using a Storyboard Launcher you cannot use a "Launch Image Set" for your Launcher Storyboard. You have to use an Image Set.
This is the best Video I found that covers it A-Z.
https://www.youtube.com/watch?v=Vz6tCgXgZFo
It also didn't fix my initial problem. Which I'll post separately. It scales correct in Portrait but not in Landscape for hand full of users. Using the same hardware as others that it works fine on.

Which controls to use for a Mac OS X application?

I developed some app for iPhone/iPad, so I know the basic concepts of Cocoa programming. Now I need to write a Mac OS X application. If you help me to choose the right controls to use, I'll study the Apple documentation reference for them.
I need:
a control to show a grid of thumbnails (png images); I'll be able to change the order of the thumbnails by dragging and dropping them;
a control to show a single image (e.g. UIImageView of Cocoa Touch) with the possibility to drag and drop another image over the first one; besides I need to move and resize the second image by dragging its corners (as if corners were "anchors");
a control to browse the media files on the Mac (possibly iPhoto images, iTunes DRM-free songs, or simply the content of a given folder), like the media browser of iMovie.
I use Xcode 4.2.
You can use NSCollectionView and co. for this. Xcode has a sample application somewhere in documentation (browsing various images) as well as tutorial on how to setup NSCollectionView yourself.
Check NSImageView. You can basically find any Cocoa control alternative to Cocoa Touch just by changing UI prefix to NS.
There is no such control per-se (unless IKImageBrowser for backgrounds), but using aforementioned NSCollectionView and some API for media files you should get around pretty quickly.
Also check ImageKit framework for images (for browsing, viewing and modifying).

Resources