How to get iphone 4 on the simulator device menu - ios

I just downloaded the latest SDK from apple, and installed without a problem, but I still don't have iPhone 4 in the device menu on the simulator. The simulator says it is version 4.2 (235). Anyone have any clues about this?

When you download the latest Xcode,and run your program in simluator,the iPhone 4 simulator is launched by default,so you don't have to worry about that.
Cheers

OK, I found out that Hardware->Device->iPhone (Retina) is actually iPhone 4. I had thought it wasn't, in part because the reported screen resolution was 320x480. See this link for a thorough discussion about this. Aditya is wrong when he says "the iPhone 4 simulator is launched by default". This actually depends on your build settings, targeted device family.

Related

Iphone4 development device xcode6

I have just started developing iOS apps with xCode 6.3. I only have 1 physical device with me, an iPhone 4 (no S). In order to work with Push notifications I need to register at least one device for development but xCode sees my iPhone4 as ineligible device (it runs IOS 7.1.2). I tried adjusting the building target to 7.1, restarting the device and the mac, but nothing has worked.
is there any way I can register the iPhone4 as development device without buying a new iOS device?
That was actually very stupid. I had tried this solution but I didn't clean and rebuild the project. After a clean, rebuild and restart (!!!) I can now run the apps on a Physical iPhone4
Try to download Xcode 5.1.1 from
https://developer.apple.com/downloads/
It's based on iOS 7.1 SDK. It should work with your iPhone4.
your device not detected Xcode 6.0 because hardware requrement not match. you must check it iPhones 4s or above. Also Xcode 6 not detect our iPhone.
there is no problem with your device.you can test with this device.follow these steps i hope u will get your problem solved.
1.remove device from xcode from window>device.
now link iphone and press trust from iphone when it asks to trust.
3.Keep your target sdk version 7.0 or 7.1.
now run your project.

Can't find iPad Air 2 with iOS 8.1.2 simulator on Xcode

I'm having a problem with the Apple review process. They rejected my app newest version because it had an issue when running on iPad Air 2 with iOS 8.1.2:
"We found that your app exhibited one or more bugs, when reviewed on iPad Air 2 running iOS 8.1.2, on both Wi-Fi and cellular networks, which is not in compliance with the App Store Review Guidelines."
Specifically, tapping Renew Subscription does not start the (In App) purchase process, it dismisses the dialogue box."
The problem is that I can't find any iPad Air 2 devices in my Xcode simulator. Searched for a solution for a lot of time but I couldn't find anything. I've tried to uninstall Xcode and then reinstall it again. Nothing helped.
I'm running Xcode 6.1.1 on Mac Book Air with Yosemite.
Please help.
Thanks Eyal.
Go to Xcode Option -
1) Windows-> Devices-> then a window will open. At left bottom corner of this window you will get +(plus) button. Click at there and add Ipad_Air2 Simulator.
or
2) Xcode -> preference -> download -> now download simulators.
Apple is going to test using the latest hardware and software. Their statement that they used an iPad Air 2 backs this up. However if you test it on an iPad Air with the latest software it should be the same.
The simulator mostly simulates screen resolution and general device type differences. Like how an iPad and iPhone have slightly different ways that they handle certain UI types. There is no iPad Air 2 specifically in the Simulator because in those ways it is exactly the same as an iPad Air 1. So it only has an iPad Air category. The simulator does not simulate the differences in processor speeds or even the differences between an A7 and A8. For the simulator your code is compiled for the mac processor.
Also, you can not test In App Purchases in the simulator, only on devices. So it wouldn't help you even if there was one there.
If your handling of IAP's works differently between on your testing on a physical iPad Air (1) and their testing of it on a physical iPad Air 2, most likely your testing will have the same results even if you went out and purchased a new iPad Air 2. So that's not a solution either.
I would try testing your app by compiling it for Release instead of for Debug. These are different and I've seen bugs only happen on the released version. I try to remember to always do this once before submitting an app. To change this go to the top left where is shows your app name > iOS Device and right click there and hit Edit Scheme.
Change the Build Configuration from Debug to Release for Run. Just remember to set it back after this test. Because for most of testing you want it set to Debug.
The only other thing you have to check is that you're still hitting the Sandbox instead of the real apple IAP server. For me this is temporarily changing the following:
#ifndef NDEBUG
#define kReceiptValidationURL #"https://sandbox.itunes.apple.com/verifyReceipt"
#else
#define kReceiptValidationURL #"https://sandbox.itunes.apple.com/verifyReceipt"
//#define kReceiptValidationURL #"https://buy.itunes.apple.com/verifyReceipt"
#endif
Again you REALLY want to make sure you set this back before submission.
When you test like this my guess is that that it will behave the same as the Apple Review team is saying. It will dismiss the box like it's doing for them. And then you can start to work on figuring out why.
Also as a side note I can tell you that I'm having this same problem under iOS8.1.x. But my app was approved under 8.0 and my IAP worked fine then. But now under iOS8.1 IAP's no longer work. Once I find a solution I'll post it here. Please do the same if you find it. Thanks!

Unable to determine simulator device to boot. - Xcode

I just downloaded Xcode 6 & played with it a bit.
After switching back to previous version of Xcode and running in simulator, I keep getting this error.
Unable to determine simulator device to boot.
How do we resolve this?
Thanks in advance.
Make sure you have only one iOS Simulator instance running in the Dock.
There was a simple answer to this for me:
Open the simulator via Xcode -> Open Developer Tool -> iOS simulator (even if it can't launch, the app will be open).
With the simulator app open, go to Hardware -> Device -> Manage Devices.
Add any missing simulators with the plus button (all of mine were missing for some reason).
I've faced same issue and solved by below steps:
1) Move xcode6-beta into application folder
2) Restart mac and open xcode6-beta from application folder.
I had the same problem when running from Xcode 6 beta selecting iPhone 5s. If I choose iPhone 5 or "resizable iPhone" then my app launches fine.
You will not see the profiles of simulator without a rebooting of OS X.I added simulator for many times,when the rebooting finished, it shows on the device list under the simulator bar. I think this is a bug of Xcode 6 Beta
I think you have 2 simulator running in the dock. Please close another one simulator and run the project again. It might helpful for you.
In my case I had such a message just because the simulated device was still booting (longer than usually, I guess). Xcode 7.2.
(This is not actually an answer to this specific question, but I came here googling the message in the title, so I am writing my note here for if someone else gets the same case as I did)
My case wasn't about having two simulators open. It was just because having instruments open as well. Closing Instruments resolved the issue
I just fixed the exact same problem by removing the beta version and rebooting the computer.

Developing for iPad 1 on Xcode 5/Mavericks

From what I can find out, the IOS 5.1 simulator isn't available on Xcode 5/Mavericks. Am I wrong about that?
The issue is that I'm developing an iPad application, and I want it to run on an iPad 1. I'd love to target IOS 7 and be done with it, but unfortunately the iPad 1 doesn't support anything past IOS 5.1. Is there some way to target IOS 5.1 yet be able to debug/test on Xcode 5/Mavericks?
Surely most apps still support the iPad 1 - there are still a lot of iPad 1's out there. But since the simulator isn't available, it's like Apple isn't letting me upgrade to the latest Xcode and OSX. What do others do? I'm hoping there's some way to do this that is eluding me!
You are correct, the IOS 5.1 simulator isn't available on Xcode 5/Mavericks. However, you can still connect Xcode to a real iPad 1 and develop that way. I bought a used iPad 1 for about $100 specifically for this purpose and it's working fine.

Xcode: App builds, but "runs" and "finishes" at the same time

I have an app created from sample code I found online. I hooked up my iPod touch 4G to my computer and everything worked fine, app ran.
Then I hooked up my iPhone 3G to the computer, established provisioning profiles, etc. In the organizer the device shows up as a green dot, so we're good. The name of the device is right there next to the run button so that's a good sign. But when I hit run it says "build succeeded" and then goes directly to "finished running on " but nothing shows up on the app!
I've tried this with several apps now and all work on iPod touch, but none on iPhone.
Devices are running newest operating systems, 4.2 for the iPhone, Xcode version is the newest.
I had a different question with more than likely the same answer
App built with Xcode 4.2 ios 5.0 crashing when installed on iphone with ios 4.3.5
I found the solution here
Is it possible to target older iOS versions when using Xcode 4.2 and iOS 5 SDK?
by mmorris
I had to do what he clearly explained and 1 more thing:
Set the compiler in the Project and Target Build Set to LLVM GCC 4.2
That got the app running on my older devices
I had problem to run on simulator not on device.
Tried above options but didn't work for me.
Finally, Just Resetting Simulator did the trick.
Make sure you are targeting the least iOS version and SDK that you can in the build profiles (targets, summary, Devices, Deployment target). Also, check the error console (All Output) at the bottom right and see if there's some kind of problem occurring.

Resources