Any way to install app to iPhone 4 with Xcode 8 beta? - ios

When trying to run app on my iPhone 4, Xcode 8 beta shows me this message:
This iPhone 4 is running iOS 7.1.2 (11D257), which may not be supported by this version of Xcode.
My app must support iOS 7. I read many answers they say that app build with Xcode 8 beta still can run on iOS 7 devices. So is there a way to install app to iPhone 4 with Xcode 8 beta? Like building the app first, then use a command line to install .app file to the iPhone?

Actually, there is a way. You just need to copy DeviceSupport folder for iOS 7.1 from Xcode 7 to the new one. It's located in:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.1
I've tried it and it works.
EDIT: If you don't have the 7.1 files anymore, you can find them here.

If you do not need to debug but only build and put the app on device then you could also use product -> archive to create .ipa file with an adhoc version and then put in on iphone 4 using window -> devices. This works on xcode 8 without any additional files.

Related

Is it possible to compile Swift 2 code in Xcode 7 and run it on an iOS 11.1 iPhone 6?

I have an iphone 6 running ios 11.1
I have an old program that I need to run, and I tried to convert it to Swift 4 but wasn't translated properly (runtime errors mostly). Just want to run it and test it out. I do have xcode 8 and xcode 9 as well but since it's written in Swift 2.x I have to use either Xcode 8 or 7.
Running it in Xcode 7 I get
Could not find Developer Disk Image
Running it in Xcode 8 I get
This iPhone 6 is running iOS 11.1.1 (15B150), which may not be
supported by this version of Xcode.
Is there a way to run this on a physical device or I must convert it ?
Yes, you can run your Xcode 7/Swift 2 app on an iOS 11 device (assuming the app is built for 64-bit) but you can't run it (debug it) through Xcode. You would need to do an archive build then export the ipa for Ad-hoc deployment and install the app via iTunes.
Don't bother with any of that. Use Xcode 8 and use its conversion tool to migrate your code to Swift 3. Get all the compiler issues resolved. Then use Xcode 9 and to build and test your app on your iOS 11 device. Optionally you can (and probably should) also migrate to Swift 4.
Swift 2 is long dead. You need to migrate. The longer you wait, the harder it will be.
Yes you can do that. Install new Xcode version ( 9 ) and extract sdk image. Put it into your 7th folder, and you can run from Xcode 7 on iOS 11 device. But wonder, iOS 11 works only with 64x architecture, so apps should not be compiled in 32bit

How to run swift 1.2 code on an iOS 9.1 device?

I'm trying to make an app in Swift 1.2. Obviously, Swift 2.0 introduced a lot of changes but before I migrate the whole project over, I would like to be able to test it while being still on 1.2.
But my iPhone is now running iOS9.1 and my Xcode 6.4 doesn't seem to recognize the iPhone for me to test.
Is there any way to run my Swift 1.2 project on my iPhone running iOS9.1? Or do I need to downgrade my iPhone in order to test the 1.2 project?
You can do what you want. But you need to take a few steps. You can get Xcode 6 to recognize your iOS device with iOS 9 but in order to do so, you need to install Xcode 7.1 and run it. Then connect your iOS device. Once Xcode 7.1 has recognized your iOS device with iOS 9 and processed its symbols you can exit Xcode 7.1 and start Xcode 6.4. Open your Swift 1.2 project and you should now be able to test on the iOS 9.1 device.
Before installing Xcode 7.1, rename your Xcode 6.4 application. For example, go to Applications and rename Xcode to Xcode6.4. This will allow Xcode 7.1 to be installed at the same time.
You can register your device with apple account and then create archive .ipa file on your machine and then using http://www.diawi.com/ this link to upload your .ipa file and generated link past in your phone browser and install it.

iOS 9 not supported on Xcode 6.3

I downloaded the iOS 9 beta for the iPhone 5s and wanted to test an application that I have finished but now it says that my iPhone is an ineligible device. Is there a way I can still run apps on my iPhone without downloading the Xcode 7 beta?
You can RUN App on iOS 9 device using Xcode 6, But firstly you need to build your app on XCode 7, after that it will support on XCode 6.
I dont know the reason.
I have checked this on My Mac.
[EDIT]
Steps
Build the project on Xcode 7 while Xcode 6 is opened on the same
project.
Disconnect the device and reconnect it.(Now u can run ur app on XCode6, It may take little time to load device)
When i have checked iOS9 with Xcode6, Bugs are very less.
So i have plan to support iOS9 with XCode6 for quick release. Later i will do for XCode7.
You can build to an iOS 9.0 or 9.1 beta device from Xcode 6.4, not out of the box though.
Download Xcode 7.0 and/or Xcode 7.1 beta dmg, and copy the
Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/9.0 (13A340)
from Xcode 7.0 or:
.../9.1 (13B5110e)
from Xcode 7.1 beta folders to corresponding folder in your Xcode 6.x.
After restarting Xcode iOS 9.0/9.1 devices will no longer be marked an ineligible.
If you installed iOS 9 beta onto your iPhone, then you cannot develop on it without Xcode 7.
However, this is not a completely terrible thing; you can readily have both Xcode 7 and Xcode 6 on the same computer.
(What you cannot do, according to Apple, is revert your iPhone back to iOS 8 - but there are some comments below from people who were able to do it.)
Install the latest XCode. Keep both versions on your Mac. Give Keep Both when installing the new XCode and do not give Replace present XCode during the installation.
Go to application, right click XCode --> show package contents. Copy the latest version from the path:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
and copy to the Xcode you are currently working in the same path. Find the screen shots below and start working.
Happy coding.
Don't need build your project at Xcode 7.0, just open and select your device, after that, open your Xcode 6.4 and your device will automatically update the necessary things to build app by Xcode 6.4
Not the easiest or correct way. But if you really have to test once or twice in the device.
In Xcode,
Product -> Archive
Build for Ad-Hoc Distribution
Connect the device
Open Itunes, Select the device,
Select Apps, Drag and drop the .ipa file generated in step 2 to itunes
Press install
App will be installed to the ios9 device.
No, you have to download Xcode 7 beta since tools like the compiler and debugger are part of the IDE.
As stated on Apple Developer Website (here), Xcode 7 Beta has the Swift 2 compiler and SDK for iOS 9. My guess is, your current Xcode doesn't know how to compile for iOS 9 SDK.
However, Apple doesn't specifically mention Xcode 7 as a requirement. It states that OS X Yosemite or later is required.
I don't think you can specifically download an SDK that isn't supported inside Xcode. For example, you can go to Xcode -> Preferences -> Downloads and under Components you may see the iOS 9 Simulator.
If you go to the iOS 9 SDK and download it, it seems to only download the device OS and not the entire SDK.
In conclusion, I believe that the SDK "kit" is integrated with Xcode 7 that would allow you to develop on your iOS 9 Device. Without upgrading, I don't see you being able to do that. I could be wrong though.

Run iOS Apps on iPhone with iOS 8 through XCode

My iphone is currently running ios 8. When I try to run apps through XCode on my phone I get this error message:
Xcode cannot run using the selected device.
No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.
In XCode under deployment target, there is no option for 8.0 (iOS 8) and the app will not run on my phone.
Is there an SDK I need to download for xcode?
Any help is greatly appreciated.
You need to download Xcode 6, which includes the iOS 8 SDK. You would download this from the Apple developer site, where you downloaded the iOS 8 Beta image from.
https://developer.apple.com/devcenter/ios/index.action
Xcode 5 knows nothing of the existence of iOS 8. You're going to need to get Xcode 6 from this page (direct link) if you want to run apps on your iOS 8 device.
Note that the direct link is only good for the version of Xcode 6 shipped alongside iOS 8 Beta 2. I have no idea what it will do when we get to Beta 3.
The way I got it to work was:
close all instances of Xcode.
open the Xcode 6-Beta
open Xcode 5 so both Xcode's are running at the same time
close Xcode 6-Beta, and after doing that, Xcode 5 will recognize your device as a capable one and you'll be able to deploy to your iOS 8 phone.
The reason you need Xcode 5 is because you won't be able to submit iOS 7 apps to the app store from Xcode 6, it'll give you an error so you need to use Xcode 5.

Can you use XCode6.3 with IOS7.1 SDK

Is it possible to use XCode6 beta with an IOS 7.1 SDK? The new tools are much nicer but I need to build for IOS7
Yes.
1. First download 7.1 SDK - XCode6Beta > Preferences > Downloads > iOS 7.1 Simulator.
Note: XCode6-Beta can co-exist with regular XCode (XCode 5.x). But when you download iOS 7.1 Simulator, it actually gets downloaded into XCode 5's path!! (probably a bug).
Open XCode5's SDKs folder..
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Open XCode6-beta's SDKs folder..
/Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Copy iPhoneOS7.1.sdk from XCode5's to XCode6-Beta's SDK folder.
Restart XCode6-beta
Now if you go to Project's Build Settings, Base SDK, you will see 7.1 along with 8.0.
Enjoy!
I'm using XCode6 and SDK version 8 regularly now, but I had to compile an app with version 7 of SDK, because version 8 was causing a lot of problems on devices with iOS8 installed, while in devices with iOS7 installed everything was running fine.. (!!)
I then:
went to XCode Downloads
browsed through some pages in order to get the latest XCode 5 version and downloaded it
opened the DMG with Image Mounter
rightclicked XCode icon and selected "Show package contents"
browsed Finder through Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
copied iPhoneOS7.sdk and pasted it to /Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
restart XCode
now you can select SDK 7.1 as the one to use in your project
this has immediately solved all of my issues with the app
From the command line, you can copy the 7.1 SDK from the current Xcode distribution to the Xcode 6 Beta distribution like this:
cp -r /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
The example above will recursively copy the contents of the iPhoneOS7.1.sdk folder to the appropriate destination for Xcode6-Beta5 . Copying the SDK to Xcode6-Beta6 would require adjusting the command line to point to the Xcode6-Beta6.app folder.
So we had a very similar issue, our goal was to debug an issue that only appears on iOS 8 (with an app built in xCode 5 on the iOS 7.1 SDK). We were trying to use xCode 6, but found it too unstable, and then decided to go back to xCode 5 and debug using UIAlertNotifications (as we could previously not connect our iOS 8 device to xCode 5)
After connecting our iOS 8 device to xCode 6, when we re-opened xCode 5, our iOS 8 device was recognized and we were able to debug using NSLog statements (break points still caused our app to crash - making it apparent that the issues related to break points are with iOS 8 rather than xCode 6 as others have suggested)
I hope this info is of some help to others out there!

Resources