Xcode 9, iOS 10 issue with Assets - ios10

I'm having a problem with assets and Xcode 9 beta running on devices with iOS 10. It doesn't upload any image from assets, so on the phone I can't see any asset!
If I load images in the storyboard, it just doesn't show any image on the phone (but it shows in the storyboard), if I do something:
UIImage(named:"imageName")!
It crashes with log message:
*** Assertion failure in -[_CUIThemePixelRendition _initWithCSIHeader:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreUI/CoreUI-428.6/CoreTheme/ThemeStorage/CUIThemeRendition.m:3788
Could not load the "imageName" image referenced from a nib in the bundle with identifier "myIdentifierName"
This is strange as the same code running on another device with iOS 11 beta works and I can see the images.

I got same problem when I test app on iOS 10.
Check the Xcode 9 beta release note and found known issues about that:
Asset Catalog
Jpeg assets in asset catalogs are not found on iOS 10 or earlier for apps built with Xcode 9. API calls for accessing the image such as UIImage.imageNamed: return nil. (32524123)
Workaround: Use png resources or limit app testing to devices running iOS 11 or later.
After convert all my jpg asset to png. It's works well. Oh...

I got same issue even in xcode 9 beta 4.
Solved by just checking this for Image.
Hope It helps.

Fixed in Xcode 9 beta 3 (build 9M174d)
Jpeg assets in asset catalogs are found on iOS 10 or earlier for apps built with Xcode 9. (32524123)

Make build with ios 11 device or generic ios device

Related

Xcode 9 - Could not load the “sampleImage” image referenced from a nib

I converted Swift 3.1 to Swift 4.0 syntax using Xcode 9.0 beta, and I have a strange problem. My images in Assets folder in the project are not loaded on my real device. I receive this information Could not load the “sampleImage” image referenced from a nib. Everything works fine in simulator. Can somebody explain me, why?
Update
After updating my iOS to iOS 11 I can see images in my app. But does it mean, that apps installed on iOS 10 and earlier will have a problem with displaying images?
I doubt apps running iOS 10 and earlier will have problems displaying images. In my experience as an iOS developer when you update to a beta Xcode release and Swift SDK you have to update to the newest iOS beta to utilize the SDK and test apps. That changes once the beta tags are removed.
The following Apple document states that "The beta OS must be installed on your device (Mac, Apple TV, Apple Watch or iOS device). The beta OS, when offered, is available on the respective developer download page. For example, see iOS Downloads."
https://developer.apple.com/library/content/technotes/tn2249/_index.html
I post an answer to another question about that. Please check this for more detail:
https://stackoverflow.com/a/44683381/3797903
Just convert all your jpg asset to png to make it run on iOS 10 or earlier device.

Release of iOS 6.1 app with Xcode 5

I'm having trouble release an iOS 6.1 app with Xcode 5. During the development we worked on Xcode 4 and then switched to Xcode 5. The application is very large and is not optimized for iOS 7. So I used iOS 6.1 SDK to compile for both iOS 6.1. Application was tested with TestFlight and it worked flawlessly on both iOS 7 and iOS 6 devices. On both devices it had same iOS6 looks, which was satisfying.
The application base SDK is set to iOS 6.1 SDK and iOS deployment target is set to same 6.1 SDK.
We sent the application in the review and it was approved. When we released the application, we realized that it is run with iOS 7 looks on iOS 7 devices. This currently breaks our layout.
Is there any way to fix this and let application be released in iOS6 mode for now?
Yes , you can do that. You have to fix every Xib for both iOS 6.1 and iOS 7 so that user can get the UX standard in whichever version of iOS they use. You have to take care of several things. Like
Fix status bar overlapping issue , there are lots of disscussions in stackoverflow about it.
Use appropriate images that matches UX standard of corresponding version.
You have add new launch images/ icons for iOS 7.
etc in short.

Different UI behaviour for iOS 7

Recently, I uploaded my application to Apple store from XCode 4.x with OS 10.7. After that I upgraded my machine with Xcode 5.0 to start with iOS 7. Now I downloaded my application from the Apple' store to iPhone 4S with iOS 7 installed. I see application's UI on device is totally different from the iOS 7 simulator. On device navigation and Tab bar are old fashioned like iOS 6 while I am expecting like iOS 7.
I think the reason behind this that the application has been uploaded from XCode 4.x and when I will upload it from Xcode 5 it will show the latest UI of iOS7.
Do anyone facing the same problem? Do you think Apple should do it itself?
You understand it right. Applications must build and updated on xCode 5 for showing the new iOS design.
You must check your app on xCode 5 before uploading it as "iOS7 ready", Note that your app might work fine with the old design on iOS 6 but no one can check that for you as they might be UI problems and even crashes depending on your old UI and code.
If you are using 100% iOS native interface you should not have to much work.
You are app is built on iOS 6 SDK, To use iOS 7 UI features, build your app using iOS 7 SDK. iOS 7SDK will be available with xCode 5. SO upgrade to xCode 5 and build app against base SDK 7.
Xcode 7 doesn't exists ;)
Your problem is that you compiled your app with Xcode 4. Only Xcode 5 is embedding iOS 7 SDK. If you want to solve your problem you have to submit your app again but compiled with Xcode 5.
(don't forget to set your correct deployment target)

Migrating an apps from iOS 6 to iOS 7

I have an iOS 6 app that works fine and was accepted by iTunes when I upload it. Now I'm trying to update the apps so it will be compatible with iOS 7. It runs well both in the simulator and on an iPhone that ran from XCode 5. When I upload the app to iTunes, it succeeded. However, later the iTunes web site reported, "Invalid Binary". This is one of my apps.
I'm using sqlite database too.
I have tried many things from the forum due to my problem, but it's still "Invalid Binary". Would someone tell me what are the things that should be changed if we want to update our apps from iOS 6 to iOS 7?
Is it a problem with the code, or is the problem with my project setting such as Build Setting, etc.?
You likely just need to include a default image for supporting the iPhone 5.
It should be called: Default-568h#2x.png
and should be 640 × 1136 pixels

Testing an app developed with SDK6 on iOS7 device

I have an app I want to update of other reasons than change of of iOS, and the work to redesign it for iOS7 is rather big and also not looking good with iOS7.
If I build it with SDK6 using Xcode 4, how do I test it on a device running iOS7. Or do I have to see how it behaves when it is coming up at App Store.
I have also Xcode 5 but with this I can not build it with SDK6, can I?
I can see the result in the iOS6 simulator after a SDK7 build but since the app does not look good with that I do not want to update it that way.
The look is ok on a iOS7 device I know, but how to test it ??
And my devices running iOS7 are not compatible with Xcode 4.
The best way for you is to install Xcode 5 keeping Xcode 4 on your Mac.
For that, copy past your current Xcode 4 in a folder named Xcode4 on your application folder and renamed Xcode.app to Xcode4.app.
After that, update your Xcode to Xcode 5 and create a symbolic link to have the iOS 6 SDK on Xcode 5.
Have a look here, where I explain how to make this symbolic link.