What's gonna happen if using Deprecated Button Properties in future iOS? - ios

I was trying to use imageEdgeInests to make the edge inset bigger, but the document says it's available in ios 2.0 - 15.0. (deprecated)
Since my app needs to support ios14, I used imageEdgeInsets for now, but what's gonna happen if an iPhone with future ios (like ios 16?) runs the code? (and if I don't add #available and UIButton.Configuration code) Is it gonna crash the app?

Related

System Image for UIButton appears in iOS14, but not in iOS13

I set system images for UIButtons and also in the tab bar. This works for iOS 14, but on iOS 13 the images are missing.
What could be the reason, for the system images to be missing on iOS 13?
Details:
I have a button with the image property set to "square.and.arrow.up" in the storyboard. (See screenshot below)
The image appears on iOS 14, but not on iOS 13 (see screenshot below. Simulators overlapping)
Similar behaviour occurs for the tab bar items. (see other screenshot below)
Xcode is 12.5, MacOS 11.2.3, iOS Simulators 13.6 and 14.5.
This happens on the devices too, not only in simulators.
The SF Symbols App claims that the icon is available since iOS 13+.
Any help is appreciated :-)
It seems like a bug 🐞.
✅ Use this bug as a feature!
Although it is a bug, it's a very good practice to always have a fallback for these kinds of ongoing stuff.
So try to export the symbol (File -> Export..) and import it as an asset to the assets catalog.
Note that although Xcode supports imported symbols, you may consider using a separated icon file (like a PDF) for older iOS devices.
Besides it is more reliable, it will bring some other benefits to your project:
1. Backward compatibility
Since it uses the embedded assets in the bundle, they can be used even in iOS 12 and below.
2. Forward compatibility!
All versions of SF Symbols.app have come out as a beta app and Apple is constantly changing the conventions and rules and other aspects of creating and using these symbols.
For example, take a look at this naming convention:
As you can see, The name of this symbol is changed from iOS 15, and old codes will not show this in the future!
3. Wider support
You can use these exported symbols where there is no direct support for using symbols (like UIApplicationShortcutItem when it wasn't supported in the early versions and here is the full example)
Wrap it up:
So it is a good choice to always have backups of symbols and fall back to them if something went wrong...

iOS 7 & 8 custom activityImage differences

Since iOS 7 we've included custom activityImages for sharing purposes through the UIActivity component. According to this official Apple documentation it states that every non-transparant pixel will be overlayed by a grey gradient. The images we used where mainly transparant (transparant pixels became white) except for the part that was useful (became grey).
If I run the same application in the newest XCode on iOS 8.4 it seems that this is different. Apple restricted the use of colours in iOS 7 with their grey overlay but apparently not in iOS 8. This results in 2 different images based on the iOS version running on the device. I can't seem to find any documentation about this change. The official documentation has not been adapted as well. So I am not sure if this is an Apple related bug or a feature.
Will I really have to support 2 different kinds of images (one for iOS 7 and one for iOS 8) when I want to use custom activityImages?
If someone can refer to some more information on this, please do so.
The documentation still hasn't been updated, but you are correct, this is a change in iOS 8. That means your app should provide a different icon based on the iOS version.
See this other answer to a related question for more details.

keep the look of my ios app like it is in ios6 rather than ios7

I have an ios app which was developed during ios5 to ios6
after updating my iPhone to ios7, there's something wrong with it.
For example, I had a textfield in an alertView which was supposed to input some password of the users, but in ios7 the interactors change a lot and the textfield is gone.
Also lots of other UI elements change greatly including switches, buttons, etc.
The UI of my app is not really flat style and it does not fit ios7 looks.
I'm gonna update my app to fix the problem of alertView,
but is there anyway that I can keep the interactors(buttons, switches, alertView, etc.) as the same as ios6?
Thanks a lot!
If you build your app with pre-Xcode 5, then it will retain the look and feel of iOS 6, even on iOS 7. But if you build your app with Xcode 5, then it will have the new iOS 7 look and feel when run on iOS 7.
However, you specifically mention UIAlertView, which is an exception. Even for existing apps that haven't been rebuilt with Xcode 5, the UIAlertView will always appear with the iOS 7 look when run on iOS 7. There's nothing you can do to have the old UIAlertView when on iOS 7.
From the sound of your question, it sounds like you're manually adding your own text field to a UIAlertView. You should never manually add views to a UIAlertView. Apple does not support this, and it appears that it is broken with iOS 7 anyway. If you look at the documentation for UIAlertView, you'll see that you can make it display a text field, including one for password input, that should fit your needs. So I would suggest updating your app to properly use the built-in text field functionality of UIAlertView.
As for keeping your app with the old look and feel, starting February 1st, Apple will stop accepting apps into the app store that are built with an Xcode version earlier than Xcode 5. So all new app submissions at that point will have the new iOS 7 look and feel when run on iOS 7. So whether you like it or not, you're going to have to deal with revising your UI to fit in with the look and feel of iOS 7.
You can do it through setting the Base SDK of your project target as iOS 6.1.
To do this , first go to Xcode 4 (Xcode.app), right click->Show Package Contents -> Contents->Developer->Platforms->iPhoneOS.platform->Developer->SDKs and copy the iPhoneOS6.1.sdk
Then go to Xcode5(Xcode.app),right click->Show Package Contents -> Contents->Developer->Platforms->iPhoneOS.platform->Developer->SDKs and paste the copied iPhoneOS6.1.sdk
So its looks like as below,
Then Quit Xcode5 and re-open Xcode5 ->Project Target->Build Settings->Base SDK and set it as iOS6.1
You can select the desired simulators from Xcode.
If its not availble, go to Xcode->Preferences->Downloads and download the simulators

How to still use iOS6 UI in iOS 7?

From the transition guide from apple I know that there is no rounded rect button in iOS 7, but when I see many "old" apps that run in iOS 7 are still in iOS 6 style.
I have recently developed an app in iOS 6, everything is good. But after iOS 7 published, I have to change a lot UI, for example, the navigation bar and bar button item. But I really do not want to adopt iOS 7 style , but with my app, UI cannot adopt itself to iOS 6 . Even I use the iOS 6 SDK, and publish my app in iOS 7 in iPhone 5, it still use the iOS 7 style and looks terrible.
Any ideas and suggestions? Thanks
It is time to change. This is how Apple sees its operating system. Older apps are already making people angry because they look outdated (look at the backlash WhatsApp is facing for not releasing an update on time). You should get on with the times, take the time and update your UI.
As a short-time solution, you can still upload to the AppStore with Xcode 4.6, compiling against the iOS 6 SDK. But this is only temporary, and you should update your UI as soon as possible.
The UIUseLegacyUI route, suggested in another answer, is a fun way to have fun with the frameworks, and perhaps experimenting, but will not be acceptible on the AppStore due to use of private and probably future-unsupported API.
You can enforce iOS 6's UI in your app:
[[NSUserDefaults standardUserDefaults] setObject:#(YES) forKey:#"UIUseLegacyUI"]

How to disable iOS 7 interface changes in my app

i have an app that perfectly work in iOS 6, and when i update my iPhone to iOS 7 that was still work fine.
Then i update my XCode, and made some minor changes in my app (i did hide 2 UINavigation back bar buttons). After that i update my app (i want to point that i didn't change interface of my app), and when i update it from appStore and launch it on my iPhone there was a completely disaster. Interface objects such as segmented control or UIDatePicker automatically changes for iOS 7 version (style, color), back bar button item change it style, etc.
My question is, how can i force my app to launch on iOS7 with previous (iOS 6) design?
Replacing all the native views (switches, date pickers, alerts, action sheets, table views etc) by your own views that replicate iOS 6 appearance.
There are some open-source solutions, too.
However, it will be very hard, don't expect to do it in a few days.
Recommendation? Don't do it. Modify the apperance of your application for iOS 7. The users will expect it. You can't leave your application forever with deprecated appearance. I understand your feelings (my apps look terrible, too) but staying with iOS 6 appearance is not the solution.
You can build your app with iOS 6 SDK. But it can be only a temporary solution because Apple will not accept such apps in few month, I think.
Here you can see how to add SDK to Xcode:
Is it possible to install iOS 6 SDK on Xcode 5?

Resources