Code and suffix for retina universal iPhone apps? - xcode

I am planning to make a universal app to support retina display. It will be a quiz with more than 100 questions. So, for the bg images the suffix will be: iPhone, iPod:320X480 = photo.png, retina iPhone, iPod: 640X960 = photo#2x.png iPad: 1024X748 = photo~ipad.png and for retina iPad 2048 X 1496 (apple doc?) (1536?) = photo#2x~ipad.png . Do I need to write any additional code? Would it be too much to include 4 images for every question, that means 4 images X 120 questions = 480 images!!!Would it be to heavy?

The suffix the OS is looking for is "#2x.png"
So if you want to do separate graphics for iPhone versus iPad, put those differences in their filenames before the #2x part.
And yeah, four images does seem a bit like overkill. Why not just simply have regular resolution image and a high resolution image for various UI widgets used in both your iPad and iPhone versions?

Related

What size screenshots should be used for IAPs ( In app purchases ) for Mac apps?

What dimensions should be used for IAP screenshots for Mac apps on iTunesconnect?
I have tried uploading PNG screenshots with:
2560 x 1600 px
640 x 920 px
to no avail... but the upload does not seem to be accepted... Can anyone advise which dimensions will be accepted? Apple specifies 640 x 920 but it does not upload and there is no error message.
I would like to add to the accepted answer because regurgitating the documentation does little to resolve actual problems.
After taking a screen shot of the app on my device for in app purchase review and it still didn't work, I did some investigating.
After you attempt to upload a screen shot and see the error to upload a valid size, you can open the browser inspector to see the error details. The image MUST be one of these dimensions:
accepted resolutions found in console error
Something else I didn't realize is when taking screen shots with command-shift-4 on macbooks, when you hold it down for the drag you can see the actual dimensions of the screen shot you are taking, but for some reason it saves it as DOUBLE the size. I ended up taking a screen shot where the cross hairs of the screen shot say 320 x 480 resulting in a saved png of 640x960. It has to be one of the pre set sizes in order for image upload to accept it.
After banging my head on a wall for a couple hours I figured this out, so I hope this helps others .
In the official docs I found this:
A screenshot of the product as it appears on the device. This
screenshot is used for Appleā€™s review only and is not displayed on the
App Store. Screenshots requirements are outlined below:
iOS: at least 640 x 920 pixels.
tvOS requires 1920 x1080 pixels.
macOS requires 1280 x 800 pixels.
Source: https://help.apple.com/app-store-connect/#/dev84b80958f
Interesting enough I just tried with a 640px (width) by 920px (height) screenshot for Mac IAP and everything is fine. Make sure you have no alpha-channel, but this gives another error.
Even though in Apple docs it says: "iOS requires at least 640 x 920 pixels.", larger screenshots actually don't work..
Long story short:
Took a screenshot from iPhone X simulator - didn't work.
Took a screenshot from iPhone 6 simulator - it did work.
The image sizes for IAP screenshots should be one of the following:
2732x2048
2048x2732
1280x800
1440x900
2880x1800
2560x1600
1920x1080
3840x2160
312x390
1136x640
1136x600
640x1136
640x1096
2436x1125
1125x2436
1024x1024
960x640
960x600
640x960
640x920
1024x768
1024x748
768x1024
768x1004
2048x1536
2048x1496
1536x2048
1536x2008
1334x750
750x1334
2224x1668
1668x2224
2208x1242
1242x2208
After reading the above answers I tried different combinations of screenshots from the iPhone 11 pro max simulator none of them worked.
I tried a screenshot from a device(iPhone 6), it worked like a charm in the first attempt.
here are the details:
dimension: 750x1334
size: 303kb
JPEG image
You basically have to use the resolution of an iPhone screen such as 750 x 1334 pixels which belongs to the iPhone 6/7/8 (4.7-Inch Retina Display).
Here's a list of the acceptable iOS screenshot resolutions:
https://www.storemaven.com/academy/product-page-creative-requirements-guide/

Using core text on Mac book pro / HD screen different text sizes

I've recently shifted to a MacBook Pro 15" and core text is behaving strangely.
I have an app that uses core text to draw an NSattributedstring with CTFrameDraw. It works as expected on the external 1080p monitor, if I drag the window across to the MacBook Pro screen then the font is displayed very tiny like it's changed from 10 point font to 5 point when painted. Likewise if I repaint the text on the MacBook Pro then it's still small.
I'd guess it's because the MacBook Pro has the high resolution screen, and the font is being rendered to the native pixel resolution. Could anyone point me to docs on how to handle this? I had a google around and came up empty.
Swift 3, Xcode 8.2.1 on OSX 10.12.2
tia
It was me. I had this bit of code
var c = context.ctm
c = c.inverted()
context.concatenate(c)
to set the transformation matrix back to the identity. It screws things up on the double pixel displays.

How to set up App Icons for tvOS Apps in Xcode

Just got the new Apple TV and I am trying to setup App Icons for a new app. It is asking for Front, Middle and Back images for both "App Icon - Large" and for "App Icon Small". I have tried putting a 512x512 image in for Middle and get the following error:
The last image stack layer with content, "Middle", must exactly fill the image stack. Its current frame is {{384, 128}, {512, 512}} while the image stack's size is {1280, 768}.
Does a 1280x768 image need to be used? More importantly, what exactly is needed in terms of image assets for tvOS Apps?
You need at least 2 images for both the App Icon - Large & App Icon - Small
(So total of 4 images - I used at first just the front & back, then I used all three layers for a total of 6 images)
The large icon is 1280x768, and the small one is 400 x 240
Apple's document:
https://developer.apple.com/tvos/human-interface-guidelines/icons-and-images/
Doesn't seems to specify that you only need one image for the 1280x768. But
I wasn't able to submit my App with just one image. I rendered my icons in the
full 1280x768 size and then scaled to 400 x 240.
In addition, you need to add the Top Shelf image which is 1920 x 720.
(Top Shelf Wide seems to be 2320 x 720.)
https://developer.apple.com/forums/thread/20689
Yes, you have add mismatched icons, that's why getting the error
Once you check all the sizes is correct

iPad not loading images

I have an iPad with a Retina display and all things are loading nicely apart from some images (they don't show up in random).
What I have tried so far:
Use -webkit-transform: translateZ(0); on those elements - didn't work
Use data-at2x="<?= $img[0][1][0];?>" on the <img> tag - didn't work
What else could I try?
Have a look at the Apple naming convention in their "Resource Programming Guide" on page 46.
The bundle- and image-loading routines automatically look for image
files with the #2x string when the underlying device has a
high-resolution screen. If you combine the #2x string with other
modifiers, the #2x string should come before any device modifiers but
after all other modifiers, such as launch orientation or URL scheme
modifiers. For example:
MyImage.png - Default version of an image
resource.
MyImage#2x.png - High-resolution version of an image
resource for devices with Retina displays.
MyImage~iphone.png -
Version of an image for iPhone and iPod touch.
MyImage#2x~iphone.png -
High-resolution version of an image for iPhone and iPod touch devices
with Retina displays.

Adding Image for App Icon throws following message: "did not have any applicable content Xcode"

I am using Xcode 6.1.1 and IOS 8.1.2 and try to add images for my app's icon; using the App Icon Sources option in the "App Icons and Launch images " in the Project General sheet.
Every time I upload images to match the required displayed Point size, I receive the following message from Xcode: " Did not have any applicable content Xcode". For example, uploading a 60pt square picture for the "iPhone App IOS 7,8 60pts"
It results into a compilation error, every time.
How to solve this?
In fact, the problem has come from the fact that the imported image for the app icon didn't have the proper size. In Xcode, it depicts the Icon size in Pt, as 29pt 2x, 40pt 2x, 60pt 2x and 60pt 3x. However, it is not possible to identify the pixel size of the required image from the literature.
One trick is to import one image for each of this icon; and opening the warning list. It will tell you the expected size.
However, here is the size in pixel for the app icons:
IPhone Spotlight - IOS 5,6 Settings, IOS 5-8 29pt 2x : 58 pixels
IPhone Spotlight IOS 7,8 40pt 2x: 80 pixels
IPhone App IOS 7,8 60pt 2x: 120 pixels
IPhone App IOS 7,8 60pt 3x: 180 pixels
Hope it can help you should you be in similar trouble :)

Resources