How to add additional Apple apps to the Xcode 10 simulator? - xcode

I looked but couldn't find an answer to this. I would like for additional Apple apps to appear in the simulator like Weather, Mail, Notes, etc. They're missing when I launch the simulator and I need them to test my app. Any ideas? Thanks.

After a lot of research, it seems that it is not possible to do this. You have to use a physical device to interact with the native apps unavailable in the simulator.

Related

Using IOKit in macOS app

I found several topics where arises the same question, but they're pretty old and most of them don't have a definite answer, or the answer is applicable to iOS only. Also some sources say it's prohibited while other disagree.
For example, here or here about iOS.
I'm interested whether IOKit can be used for macOS applications - note! macOS, not iOS - to get only battery information.
If no, I'd like to find out, how apps like Battery Health work.
What are your guesses? Thanks.
The IOKit.framework is a reasonably well documented, public API on macOS. Many apps and most 3rd party device drivers use it. For the Mac App Store, entitlements restrictions apply.
Regarding Mac battery status, you probably want to take a look at the IOPMPowerSource/AppleSmartBattery objects. The output from running the following command on the Terminal should give you an idea of what information is available:
ioreg -w 0 -irc IOPMPowerSource
The AppleSmartBattery source code is available, that's probably your best reference.

Adding unsupported browser features with polyfills

I am working on an app and at the moment in the process of deploying. The app is using the feature react-intl from yahoo here . I noticed a refernced to the polyfill
<script src="https://cdn.polyfill.io/v2/polyfill.js?features=fetch,Promise,Array.from,Array.prototype.find,Array.prototype.includes,String.prototype.startsWith,String.prototype.includes,Math.sign,Intl.~locale.en,Intl.~locale.id,Intl.~locale.ru,Intl.~locale.fr&unknown=polyfill"></script>
And i was told its to add the feature to the browsers that do not support them. So far this works on all the devices we tested. I phone, android devices etc. However, this feature fails on ipod devices. Regardless of the ios version, the feature is not recognise on all ipod devices i tested as a result our app is failing. Please why is it that other devices iphones, androids etc supported this feature and only ipod doesn't. Did anyone had similar issue with polyfills on mobile devices ? How do i make ipod devices support this feature like the others? What am i doing wrong with the referenced ? Any help would be appreciated.

iOS Architecture and Xcode Organiser window

Can anyone tell me where I can get more information regarding iOS architecture and xcode organiser window.
Thanks in advance.
Assuming that you're just getting started with iOS programming, I'd recommend either checking out the "Getting Started" documentation that Apple provides on its website, or grabbing a book that provides an overview of Objective-C and Cocoa Touch from your local bookstore. I've always enjoyed the stuff that Hillegass & Co. at Big Nerd Ranch produce, so I might recommend starting with their "iPhone Programming" manual.
Xcode's Organizer window is a little strange at first, since there are no real counterparts to it in Eclipse or Visual Studio, but most of the step-by-step tutorials that you can find online and in iOS programming books typically do walk through your use of the Project Organizer for managing your devices and provisioning profiles. (This is all it's really useful for, unless you start getting into advanced use of a version control system.) If you're a casual or beginning iOS developer, then once you get your development devices set up and your development profiles loaded onto those devices (documented clearly in step-by-step fashion on the Apple Developer site), you probably won't come back to the Organizer much unless you need to grab an output log or a screenshot from your device.

Testing a web app for macs - is IPad ok?

Many of my clients use Macs and I'm getting weekly emails about bugs in my web-app software that are Mac only issues.
I have a limited budget so I'm hesitating going out any buying a $1,200 Mac for testing.
Would an iPad work?
Or would that not be the same kind of browser rendering as a Mac Book?
can I recommend a $700 mac then?
The biggest benefit is, that with virtual machines, you can now create a testing environment for nearly every system you wish to be a client on
The iPad Safari is more based on the iPhone mobile safari rather than the desktop Safari. You may have better luck getting a Mac Mini, or searching eBay for a used Mac.
Uhm… why has nobody mentioned yet, that Apple distributes Safari for Windows? For free.
You are not very specific about the kinds of problems your uses report. I would be very interested in which of those are not testable with Safari on Windows!
There are better ways to mimic common mac browsers than buying common mac hardware. Look into browser emulation products like browsercam.
Since no one said it directly yet, iPad does not render exactly the same as Safari on 10.6, nor can interactions be tested because one is gesture and touch based and the other is keyboard and mouse. You're cheapest option is the $700 Mac Mini plugged in to your existing input devices.
Unfortunately, because apple forbids the virtualization of it's OS (PDF:Section 2.A), you can't find anyone who will take browser shots in any reasonable amount of time. Of course, screen shots will only really help you if it's a rendering bug. If it's interaction, $700 isn't all that much more than $500, plus, you get a Mac! ;)

Bluetooth proximity hooks on OS X. How? (i.e., automatically lock screen if I move away)

I have a macbook pro. I would like to have my screen lock when I (my phone) moves away from the laptop. I'm sure third party solutions exist, but if I'd like to code something from scratch, what libraries or hooks should I be looking at?
http://web.mac.com/jhollington/technocrat/The_Technocrat/Entries/2007/3/18_Bluetooth_Proximity_Detection_on_OS_X.html has a pretty good step-by-step on how to do a lot of this, although it's using an existing app. That app is open source though, so maybe this will help too? http://code.google.com/p/reduxcomputing-proximity/
I know it's an old question, but I've stumbled upon it today and have an answer.
Here's an opensource third-party solution: BLEUnlock
Lock/unlock your Mac with your iPhone, Apple Watch, or any other Bluetooth LE devices
It contains a modern version of all the code you need. Plus, the app itself supports hooks so you can add a hook to the app instead of writing your own.

Resources