I just would like to know whether Xcode Simulator enable Force Touch functionality, adding the new Apple Magic Trackpad 2 to an iMac (my mac is a middle 2011 model). I need to simulate this feature, saving the money to buy a new MacBook that has it embedded.
Yes. Magic Trackpads can be used to send force levels to iOS want watchOS simulator devices.
Related
Today I downloaded the release of Xcode 12.3, and I went running the iOS 14.3 simulators and it seems like there is a graphic glitch that all translucent views are yellow, dock included.
I redownloaded iOS 14.2 and those seem fine. It just seems really odd. I've submitted feedback, but I was curious if anyone else has seen this?
I'm on macOS v10.15.7 (Catalina) and am curious of if it's just Catalina or also macOS v11 (Big Sur).
Xcode 12.4 RC has announced fix.
iOS simulated devices no longer display an incorrect yellow tint in translucent UI elements. Certain GPUs may continue to display the tint with some tvOS simulators. (71203015)
I think it is a bug related to the discrete GPU.
In addition, this bug causes the background of the on-screen keyboard to be almost RGB(0,0,0). Experienced on MBP 2017 with Catalina.
Workaround I - Using integrated GPU
In the simulator, set menu File → GPU Selection → Prefer Integrated GPU to work around this bug.
Restart the simulator.
This was tested on a MacBook Pro with Catalina and Big Sur. As comments suggest that it won't work on iMac.
Workaround II - Reduce transparency
In the simulated device (e.g. iPhone), Settings → Accessibility → Display & Text Size → turn on Reduce Transparency.
Notice that it can only reduce the previous 'solid' yellow to 'fairly light'.
I find this workaround, as the discrete GPU can be used, is more suitable for testing the UI logic than the previous solution.
This was tested on a MacBook Pro with Catalina. Might work on iMac.
Are you using a MacBook Pro? I had the same bug.
I solved in the following ways.
Step 1: Unplug all cables, including the charging cable
Step 2: Restart the iOS simulator
Best way around it (what I've done), is to download the 14.2 Simulator pack from within Xcode.
Open Xcode->Preferences
Tap Components
Tap the 14.2 Simulator pack and Xcode is going to start installing it.
It's a workaround till they fix that miserable error.
It is Xcode 12.3 bug! you can see that sometimes in the code interface builder too:
It is not critical but If you really care about it, download and use the previous Xcode from here
Nothe that you can't build for iOS 14.3 if you choose to use Xcode 12.2.
More description
Xcode always have unknown issues at the release point. Some of them are critical like this with 54K views! and some are not like this issue with about 5K views in only 13 days.
My suggestion is to always have 2 Xcodes at the same time until you are sure about Xcode bugs!
Happened to me as well, while I was charging my MacBook Pro 2016. I closed my Xcode, disconnected my charger from the Macbook and run it again. The problem was fixed.
One thing to point out/confirm: Seems the issue is limited to the simulator. The issue does not persist when sideloading the project to iPhone.
I noticed when I develop apps using different Macs(i.e. office-Mac and home-Mac), every time I plug the iDevice(iPhone, iPod...) with Mac, click the View Device Logs button under Window -> Devices and Simulators option, there are some (crash)logs in one Mac and others in another Mac. Or sometimes
My question is:
why this is the case?
How can I view all the logs in one Mac?
Is there another way to view/analyze (crash) logs of iDevices correctly and conveniently without using Xcode?
Here is my environement:
macOS: High Sierra(home-Mac), Sierra(office-Mac)
Xcode: 9.2, 8.3.3
iDevice: iPhone SE(iOS 10.3.3), iPod Touch 5th-Gen(iOS 8.2)
Many thanks in advance.
When it comes to simulator features what would be different between the iPhone 7 and the iPhone 8 simulators beside the device id? Why did Apple include both in Xcode?
You're unlikely to get an authoritative answer to any "why did Apple..." questions here — Apple as a corporate entity doesn't post to SO.
There aren't really notable simulator features different between iPhone 6, 6s, and 7, nor between the two generations of iPad Pro 12.9" hardware, nor between the various iPhone Plus models, etc. For the past few years of major Xcode releases, they've just included / let you create device-specific simulators for every supported device regardless of whether there's any meaningful difference between those devices at the level Simulator implements. (Of course there are lots of hardware differences that are outside the scope of Simulator, like Metal feature sets or camera features.)
Back before they started having device-specific Simulator profiles (around the time of Xcode 6, IIRC?), Simulator offered a smaller set of profiles mapping to the significant differences in screen geometry — e.g. iPhone 3.5", iPhone 3.5" retina, iPhone 4" retina, iPhone 4.7" retina, iPad, iPad retina, etc.
One issue with that, and a possible reason why Apple changed course, is that the increasing variety and history of Apple devices makes it harder to keep track of what's what in your head. (Okay, I want to see how my app works on iPhone 5s now. What screen size was that?) Another might be that UI size hasn't been directly tied to device size since 2014, where iPhone 6 and 6 Plus (and their successors) have offered a zoomed UI mode (which IIRC is also in Simulator).
Another issue is that there are device differences that don't map to screen differences, like 64-bit support (not that running a 64-bit app as an x86_64 binary in simulator is much like running an arm64 binary on a device, but it's a first approximation), Touch ID (which the simulator provides a proxy for), etc. And (as #russbishop's answer notes) the simulator also makes sure that APIs like uname return realistic values (like iPhone10,1 for iPhone 8) rather than a fictional simulated device.
If you'd rather cut down your set of available simulator targets in Xcode to only those that offer significant screen geometry differences, feel free to visit the Devices and Simulators window and delete/rename to your heart's content. For iOS 11 you could cut down to just iPhone 5s/SE/iPod Touch 6th gen, iPhone 6/6s/7/8, iPhone Plus, iPhone X, and three sizes of iPad screen, getting you eight different run destination instead of the default seventeen.
The answer is because the Simulator is attempting to be as accurate as it can. This ranges from returning the correct model identifier to differences in framework behavior. Sometimes there are new hardware features (eg Touch ID, Face ID) that are only available on the relevant simulators.
How do I test the microphone in my IOs simulator? I don't think it records through the built in audio at the top of my Mac screen, which I understand.
Which of these options would work?
1.Plug a real microphone into my laptop
2.Export the app into my Iphone <- I don't know how to do this yet
3.Download some library that will use the built in audio on my macbook screen <- I saw a youtube video about this months ago but I can't find it now.
I appreciate any feedback. I'm asking this now to avoid programming strings of code that I cannot test.
Thank you
-Samuel
The built in microphones should work with the iOS Simulator.
I don't think microphone works as of iOS 8.2. Here is link from Apple documentation that state this fact:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/iOS_Simulator_Guide/TestingontheiOSSimulator/TestingontheiOSSimulator.html
Look at the Hardware limitations section.
The simulator this will automatically use your Mac's built-in microphone
AVAudioRecorder will record audio from the microphone. If you're using the simulator this will automatically use your Mac's built-in microphone, so you can test either on device or in the simulator.
And if you are on a Mac mini without a microphone input?
Remember that there is a neat trick to record audio from your iPhone/iPad. You need a lightning cable or USB-C cable connected and enable your hardware device in the Utilities/Audio Devices settings:
Click on enable:
This new audio input will be visible in your emulator! So now you can record in simulator even if your Mac hasn't got a microphone
It has been available forever I believe and I just verified, it works for the Mac mini 2018 and macOS Catalina 10.15.4 and Xcode Version 11.4.1.
It will be enough to trouble shoot your iOS apps, but there is a small caveat. By default you get the line out from your iOS device, so I could play music and my mac would receive it. So far so good.
However to properly access the mic you would need a third party app to bridge and make the mic available to the mini but this is not necessary to just troubleshoot the mic on the simulator. I hope I explained myself.
I'm working on an Adobe Flash Builder 4.5 iPad application. I have only a humble 13" MacBook to work with.
I am being aggravated by the problem of debugging my application in the Flashbuilder's iPad simulator. The FB simulator screen is almost the same physical size as a real iPad, which is too big to fit on a 13" MacBook.
QUESTION: Is there some setting in Flash Builder 4.5 that would scale the iPad simulator to fit the available screen real estate?
Increase the resolution of your Macbook or use the physical device to do development. I don't think it's possible to 'scale' the emulator, nor would you want to.
While I don't know of a way for you to actually scale it, you can get around some of the problems by just rotating it (Command-R)