Issues With Testing On Device & Simulator - swift

I'm having an issue testing my apps on my device and simulator ever since I upgraded to Xcode 8.
Whenever I try and use the simulator on my Mac, it says it cannot find a connection or "DTS, cannot bless the connection". So I plugged in my phone into my Mac to test instead and it seems to cut off half of my app, most importantly my toolbar with buttons. All of my constraints are good in storyboard. So I'm not sure why this is happening. What do I do to fix this? Is it a problem with Xcode?

Related

Iphone resolution on an Ipad

We have an app that has been rejected in the review process by the Apple app review people. The cause for the rejection is that the app is not scaling properly when run on an Ipad.
The app was never meant to be run on an Ipad, but there seems to be no point in arguing with them about that.
Apple sent us a couple of screenshots that show our app being run on an Ipad with the top portion of the view cut off. Notice how the app is run in some mode where it looks like an Iphone app and does not fill out the entire display area. When we bring up the app on an Ipad, it fills out the screen and does so without any edges cut off.
Can anyone please tell me how to run the app on an Ipad the way the Apple guys have - Iphone-sized? We believe we have a fix for the issue but we need to reproduce the error and then be able to verify that the fix solves the issue.
(the logotypes in the images are intentionally blurred)
I just went through this myself and here is how I resolved it:
Go into info.plist and see if any of the supported interface orientations are set for iPad. Despite selecting iPhone only, I had iPad supported orientations for four (portrait, portrait upside down, landscape left, landscape right). I deleted those.
I also deleted any reference to the launch screen in the info.plist. My app is pretty simple and there's no preloading of data so I don't really need a launch screen. If you do, you could go old school and make your first VC the launch screen.
I then made these changes in Target-->General-->App Icons and Launch Images
That was the only way I could get it in the sim to run the app at iPhone resolution while running an iPad (iPad2, iPad Air).
If Apple is going to force developers to ensure an app runs on an iPad even if it is made just for iPhone, they should eliminate the iPhone Only and Universal options and just have iPad Only as an option.
To run an iPhone app on an iPad, you just need to:
Acquire an iPad (you can also use the simulator)
Set the target device family in Xcode (it's under your target) to iPhone
Connect your iPad, perform any necessary certificate dances
Run the app on the iPad.
As long as the target device family is set to iPhone, the iPad will show your app in this mode.
Apple is likely running your app on a simulator, not on a real device. Notice the "2X" on the top right. In XCode - you should run the app on iPad Retina Simulator. On the bottom right you will see a button that you can toggle from 1X to 2X.
If you place the simulator in "2X" mode, you will see what Apple is seeing.
What OS are you running on your iPad? Things have changed in iOS 8 - and that's likely why you're not seeing what Apple is seeing. My guess is that your are running an app that was initially developed for iOS 7 or earlier - which means that you need to upgrade from scaled resolution to native resolutions to resolve this issue. Here is how you do it:
How to enable native resolution for apps on iPhone 6 and 6 Plus?

iPhone app testing on iPad seems to fail (nothing happens)

My questions is in regards to an app designed for iPhone being available on the iPad/iPad Mini.
In the past I've been able to test .ipa files on an iPad and they've just appeared in the "2x zoom" mode, which is what I want.
When my testers try and add my latest .ipa to their iPads they now get a greyed out app icon which, when clicked, says "installing" and then nothing happens. I tried setting my iPhone app to "universal" target, this allows the app to be dragged to an iPad but the GUI is all botched and I'm trying to avoid making a new GUI just for iPad.
So, my question is: "Is this the way things are in the latest iOS/iTunes?" and "Do I have to create a new GUI if I want it to be available on the iPad as well as iPhone?"
I can test directly from xCode onto my iPad and it works in the 2x zoom mode, looks fine and does the job. So why is it different when it comes to using the .ipa system for users without xCode?
ISSUE SOLVED
Well, I say solved. I simply set my target to 6.1 rather than 6.0 and it worked. The icon now appears on my iPad Mini and works. The mini is running 7.0.3.

External Accessory Framework...EADemo issue

Exploring External Accessory Framework to connect iOS device via bluetooth. I downloaded Apple's EADemo project here: http://developer.apple.com/library/ios/#samplecode/EADemo/Introduction/Intro.html
But how do I test it? I'm new to XCode and Objective-C, so assume nothing. I opened the project file. I have it set to iPhone 5.1 Simulator at the top left. I click on the 'Product' menu...then I click on 'Run'. That opens the iOS simulator and it says no accessories connected. How do I get it to detect other bluetooth devices? If I go to general settings in the iOS simulator, bluetooth is set to off. If I move the switch to 'On'...it just spins and spins and spins and does nothing.
Can anyone help?
Thanks!
Yeah, you can't test EADemo with the simulator. Only works with actual devices.

Testing universal app on iphone only

I am developing a universal ios app and the iphone version is nearly done and about 50% of the ipad. However I need to get started testing the iphone version. Therefore I changed the project only to be a iphone target. However when the app is on the ipad, the nib files for the ipad version is loaded in the iphone simulator. Therefore you only see a fraction of the ipad screen in the iphone simulator. One solution is to remove the references to the ipad nib files, however I would like to avoid this approach.
Anyone one with suggestions?
Regards
EDIT: The problem is if I want people to be able to test the iphone version on a ipad(some people only have an ipad not an iphone). When running the iphone simulator on the ipad, it would load the wrong nibfiles. Those intended for the actual ipad and not the iphone.
You don't want to "change the project only to be a iphone target". Change it back and just build and run on the device (iphone or ipad depending upon which one you have plugged in).
Btw, in future I STRONGLY recommend that you test early and test often - e.g. test on devices every day.
Okay, it ended up with the solution I did not want to do :) I removed the nib files intended for the ipad and it removed the issue. After the test I will have to add the ipad nib files to continue working.

Not getting clicks in iPad version of my iPhone application

Using the latest SDK from Apple, I noticed that while running on the iPhone works fine, the iPad version of my application doesn't "accept clicks" on any view/widget that is outside the "bounds" of the standard iPhone screen.
Any idea?
Thanks,
Reuven
Vanilla iPhone apps will only accept touches within that little bounds, to reproduce that fact that the iPhone resolution is only 320×480.
To fix it, upgrade your app for iPad.
(Also, make sure you don't hard-code any numbers. For example, use [UIScreen mainScreen].bounds.)
OK - found it...
All I needed to do was to open MainWindow.xib in Interface Bulder, and in the Window Attributeds palette, to check "Full Screen at Launch".