The ios 7 simulator will not cancel the user interface for applications compiled against ios 6.1 sdk

The ios6.1-sdk-compiled app works great on ios 6.1 iphone 4, 4s and 5 devices. When launching the application on ios7 iphone 5s, the user interface still looks like ios 6 (black buttons, etc.), but everything is fine with us, but we found an error. I assume this is due to changes in the implementation of the API on ios7.

When our application is compiled against ios7-sdk on xcode 5, everything falls apart. The user interface objects are offset, the label cannot be read, etc. Therefore, we want to compile our code using ios6.1 sdk, but run it on ios 7.

In Xcode 5, I installed ios 6.1 sdk by copying it from Xcode 4.6.3 dmg, as described in this post , and upgraded the Base SDK to ios 6.1 on the build, but when I run the application on the ios 7 simulator, the user interface will not return to ios 6.1. However, it reverts to ios 6.1 if the application is tested on a physical iphone running on ios 7.

How can I get the ios 7 simulator to drop the user interface when launching the applications compiled by ios6-sdk so that we can reproduce the error on the simulator?

+6
source share
4 answers

Thank you all for your help, but so far the best solution that allows me to reproduce the error is to continue using xcode 4.6.3 and install iOS 7 simulator in xcode 4.6.3.

I did this by installing both xcode 5 and 4.6.3 side by side (copy xcode.app to xcode4.6.3.app, then install xcode 5 from the app store (overwrite xcode.app)), then symlink

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk

to

/Applications/Xcode4.6.3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk

Make sure xcode does not open when it is running. If you have already overwritten 4.6.3 to 5, you can download dmg 4.6.3 from https://developer.apple.com/downloads .

Then I will put:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iOS Simulator.app

(i.e.: xcode 5 version for the simulator application) on my dock

When testing the application, I had to manually run the simulator from the dock and select the appropriate version of the device (go to "Hardware → Device → select iphone 3.5" / 4 "- ios6 / 7), because xcode 4.6.3 could not automatically do this ( presumably due to the difference in version /, because I did not bind the xcode 5 simulator application to 4.6.3)

At startup, make sure that “iPhone 7.0 Simulator” is selected on the xcode 4.6.3 diagram. The compiled ios6.1-sdk application then returns to iOS 6.1 UI when running on ios 7, and I can reproduce my error.

+4
source

If I understand your problem correctly ... I ran into the same problem with our application and had to support the iOS6.1 interface built into Xcode 5 and working in iOS7. Our interface has also been corrupted, shifted and toolbars missing buttons. We will fix it later for 7, but we don’t have the time right now, but we need it to work on iOS7 and still be built in Xcode 5.

So here is what I did: (I would like to post some screenshots, but don't have my mac handy, later it will work out if necessary)

  • I saved Xcode 4.6.3 along with Xcode 5.
  • I added a symlink from the 6.1 SDK to the Xcode 5 installation. (I found the SO question for you, I will find the link) Or you can install it the same way you do.

(These next 2 options may not be needed, but we have finished using them during testing, and it works even with the new 5-bit 64-bit phone)

  • In the build settings, I chose the build architecture to use the standard, non-64-bit armv7 option, do not select the “including 64-bit” option.

  • same place, Build Active Architecture Only to Yes

Then...

  • Also in the build settings, install the Base SDK in iOS 6.1. (I believe this was the key to make it work)

  • General tab of the application’s goals, set “Deployment target” to 6.1 (our version is still at 5.1, for now)

  • In our storyboards, select “File Inspector,” in the “Interface Designer” section that I selected, opens in Xcode 4.6 and Builds for iOS 5.1 and later and displays as iOS 6.1 and earlier. (my autorun is not installed, we do not use it)

A warning about this last option for "opens at." If you select "opens in Xcode 4.6", you will lose editing the storyboard for iOS7. In my case, I don't care because I want him to stay at 4.6 looks. Just keep that in mind. I think you can switch it, but not tested.

With the 6.1 SDK connected / installed, you should be able to select the desired version of iOS for use in the simulator when the application starts. You will see it in the Active Scheme drop-down list on the top toolbar. In my case, I can, for example, select iPhone Retina (4 inches) and below that I have an option for iOS7 or 6.1. The interesting part for me is with the settings above, I can run my application in the simulator, and it looks like iOS6, even if I choose iOS7 as the active simulator circuit. It even worked in a 64-bit simulator, which in my setup will only show iOS7.

At least in this way, I can create and work in Xcode 5, ad-hoc to distribute the application for iOS7 users, but keep the iOS6 styles, placements and buttons intact. Now I can spend more time switching to iOS7 styles, but I can still fix bugs and update the application as if it were iOS6.1.

Hope this makes sense, and I hope he answered your question. And I hope I remembered everything I did! I will add more if I come up with something.

+4
source

The appearance that you describe, I'm probably afraid of the correct behavior for iOS 7. The dimensions of the contents of the table view are calculated differently, for example (this will change the position of many elements), as well as many other changes.

If you want to preserve the look of iOS 6, you will need to compile it under Xcode 4.6, not 5. You can still run it under iOS 7, and in fact you can create an iOS 7 device for development by authorizing it in Xcode 5 , and then switches back to Xcode 4.6.

I suggest you read the Apple iOS 7 Transition Guide , also for advice on developing a user interface compatible with iOS 7.

0
source

Try "reset contents and settings" in the simulator and make sure that you use the correct simulator and SDK for your circuit in Xcode when you create and run it. If you install the iOS 6.1 SDK as you describe, you should see what at first glance seems to be duplicate in the list of simulators available for your target scheme - one of those who wants to get the desired behavior (most likely, “iOS 7.0 | iOS” 7.0 SDK, "but it doesn’t always seem.) Make sure the deployment target is set to 6.1 or earlier and your base SDK is 6.1 (as you described)

0
source

Source: https://habr.com/ru/post/954471/


All Articles