Apple (iOS/Mac OSX)

Enumerating directory chosen with UIDocumentPickerViewController

iOS Programming - Tue, 11/13/2018 - 20:39

I'd like to enumerate the files in a directory chosen by the user within a UIDocumentPickerViewController.

  • I get the directory URL returned from the document picker.
  • I call startAccessingSecurityScopedResource
  • I create an NSFileCoordinator instance and begin coordinated read of the directory. Inside my read handler I attempt to get the contents of the directory using FileManager. I see that there are a bunch of blah.png.icloud files in the directory. This makes sense because I'm picking a directory within my iCloud drive.

What's the right way to enumerate the contents of this directory? I need to enumerate for two things:

  • image meta data
  • image data

I feel like NSMetaDataQuerys would be my best bet, but they don't seem to like using the URL provided to me by the document picker as the "query scope". (The queries begin, but never update or finish)
Anyone know of any good resources for this? I see a lot of stuff about reading the ubiquitous directories using NSMetaDataQueries, but not the directory locations chosen by a user via the document picker.

Bonus Question:
Will I need to initiate full file downloads of the ".icloud" files in order to read their image meta data? (image width and height)

submitted by /u/zerocustom1989
[link] [comments]

OK Google, what is African ISP Main One, and how did it manage to route your traffic into China through Russia?

The Register - Tue, 11/13/2018 - 20:26
Sub cable biz raises hand, 'fesses up to causing BGP reroute drama

Monday's prolonged Google cloud and websites outage was triggered by a botched network update by a West Africa telco, it is claimed.…

It's November 2018, and Microsoft's super-secure Edge browser can be pwned eight different ways by a web page

The Register - Tue, 11/13/2018 - 19:02
Look, we're tired of doing these headlines too, but for there's patching to do

Microsoft and Adobe have delivered the November edition of Patch Tuesday with another sizable bundle of security fixes.…

Having some weird animation bug using TrailingSwipeActionsConfigurationForRowAt to delete cells.

iOS Programming - Tue, 11/13/2018 - 18:48

I'm trying to simply delete cells with this method of tableView. For some reason, doing so creates this weird animation bug that I can't figure out. Here is my code:

let deleteSubcatAction = UIContextualAction(style: .destructive, title: "Delete") { (action, view, handler) in print("Delete Subcategory Action Tapped") let subcategory = Global.budget.categories[indexPath.section].subcategories[indexPath.row] Global.budget.categories[indexPath.section].subcategories.remove(at: indexPath.row) tableView.deleteRows(at: [indexPath], with: .left) } deleteSubcatAction.backgroundColor = .red let rowConfig = UISwipeActionsConfiguration(actions: [deleteSubcatAction]) return rowConfig

When I drag the cell to the left, I see the delete action as I expect and pressing the action calls the method as it should. However, the cell isn't removed from the table. Instead, the actions stay locked in place and the rest of the content of the cell slides back to the right as if I had released my finger without pressing an action. Then, if I tap elsewhere in my app, the actions minimize back to the right, and the cell simply disappears without any sort of removal animation. What's happening here? I would capture the bug to show you, but am not sure how to record the simulator.

submitted by /u/kforte318
[link] [comments]

FPGAs? Sure, them too. Liqid pours chips over composable computing systems

The Register - Tue, 11/13/2018 - 17:57
Xilinx Alveo cards added to platform list

Liqid has added FPGAs to the list of compute resources its customers can use to compose workload-specific computing systems.…

Another 3D printer? Oh, stop it, you're killing us. Perhaps literally: Fears over ultrafine dust

The Register - Tue, 11/13/2018 - 17:16
Bio-boffins bet beastly bad bits bash bronchi

Analysis Scientists are calling for more research into the effect, negative or otherwise, of 3D printers on indoor air quality.…

CloudKit + Push Notifications + Python

iOS Programming - Tue, 11/13/2018 - 17:08


I'm wondering if anyone here has experience using CloudKit notifications while utilizing an existing infrastructure. Long story short, we make template apps targeted towards K12 schools, and we have to maintain 1200+ push certificates; not only is this time-consuming, but error-prone. One server handles the backend of all apps.

I know tools like FastLane can automate renewing push certificates, however, I'd like to be done with them. I've read up that multiple apps can share the same CloudKit container, and we can apply filters based on messages.

However, how do I go about setting up a server and communicating with CloudKit to actually push a notification from the server, into CloudKit? All the tutorials I see involve creating records directly into the CloudKit dashboard, but I don't see much in the way of code/examples that involve creating those records on a remote server, and then pushing them to a device.

submitted by /u/anwserman
[link] [comments]

Russia: We did not hack the US Democrats. But <i>IF</i> we did, we're immune from prosecution (lmao)

The Register - Tue, 11/13/2018 - 16:07
Hackers are lethal weapons, as in diplomatic... oh forget it

The Russian government has denied having anything to do with hacking the US Democratic party in 2016, although in a court filing this week stressed that even if it did break into the DNC's servers, it is immune from prosecution.…

How do I create an app Icon that is not blurry?

iOS Programming - Tue, 11/13/2018 - 15:59

I am struggling to make an app icon. Every time I try a new tool the image always ends up blurry like this, ignore the black corners the image itself is clearly blurry (bottom left app)

I have tried screenshotting something I make online or exporting from adobe illustrator. I also have tried multiple resizing apps and tools online but the image always comes out the same. Where can I go to make a high quality image for my app

submitted by /u/p511
[link] [comments]

Microsoft lobs Windows 10, Server October 2018 update at world, minus its file-nuking 'feature', after actually doing some testing

The Register - Tue, 11/13/2018 - 15:11
Wow, what a novel concept: 'Extensive internal validation'

Is the Windows October 2018 update here again? Or did it never exist previously? Are we all in a feverish dream where the latest version, build 1809, is stable and fit for purpose, and Patch Tuesday was totally uneventful? Our finger hovers over the "no" button, but we live in hope of someone one day fitted a "yes" key.…

Mac: Twelve South Journal CaddySack

iLounge - Tue, 11/13/2018 - 15:00

Last year, Twelve South added to its venerable BookBook product family with BookBook CaddySack, providing an elegant way for users to store and carry all of their MacBook essentials — an especially handy accessory in the new era of USB-C dongles. Now, to accompany its new Journal for MacBook, Twelve South has also released Journal Caddysack, providing the same convenient storage for a MacBook power adapter and other miscellaneous cables, in a luxurious, New Zealand full-grain leather package. Inside the folio case you’ll find a collection of elastic bands, Velcro straps, and a pocket so you can neatly hold a variety of accessories and have them ready at your fingertips, rather than tangled up inside your messenger bag or backpack.
Categories: Apple (iOS/Mac OSX)

How can I replicate the UICollectionViewCell of the new Shortcuts Apple's app?

iOS Programming - Tue, 11/13/2018 - 14:55

I wanted to color my UICollectionViewCell as the ones in the new Shortcuts app created by Apple, which attributes should I edit and with which effect? Also, if you can easily recognize it, which is the font style used in these UICollectionViewCells?

submitted by /u/MattRighetti
[link] [comments]

List of supported devices for a given framework? (CoreNFC)

iOS Programming - Tue, 11/13/2018 - 13:16

Hi all!

I'm currently playing around with CoreNFC and would like to get an idea of which devices support the library. After a bunch of googling I believe the min specs are iPhone 7, iOS 11. However I do not believe that any iPad is supported.

My question is: Are there any resources that provide you with a list of supported devices for a given library? (or at least just CoreNFC).


submitted by /u/chris-paterson
[link] [comments]

Any cool ideas for algorithms related to iOS/Swift dev that I can write a research about?

iOS Programming - Tue, 11/13/2018 - 13:08

Hey all!

I have to write a research paper for my algorithms class. I've also been getting into iOS Dev recently and wondering if there are any cool algorithms that I could look into that are realted to iOS Dev. Any idea I had is getting a deeper look into auto layout although I don't know how much research info there is on this subject. If I can't find anything related, that's alright. I'll look into something more mainstream with an abundance of info.

Thanks in advance for the discussion friends.


submitted by /u/looloosha
[link] [comments]

News: Spotify now available on Apple Watch

iLounge - Tue, 11/13/2018 - 12:51

Spotify has officially announced its app for the Apple Watch. The release comes not long after it was rolled out to Spotify beta testers earlier this month, and while the initial app appears limited to providing playback controls, Spotify has acknowledged that the ability to listen to music offline is in the works for a future update. While the standard watchOS “Now Playing” app previously allowed users to pause and resume playback, the…
Categories: Apple (iOS/Mac OSX)

Why Aren’t There Third-Party USB-C to Lightning Cables?

Daring Fireball - Tue, 11/13/2018 - 12:34

Here’s a thread on Reddit asking why there aren’t any USB-C to Lightning cables from reliable, certified companies like Anker, Monoprice, and Amazon. It’s a year-old thread and the situation is unchanged. This stinks now that the entire MacBook line has gone to USB-C, along with chargers that output by USB-C.

I have this Anker 30-watt charger, for example. It’s a terrific product — nice size, great build quality, and just $26. (Apple’s 30-watt charger is $50.) Another great charger is Apple’s new 18-watt charger that’s included with the new iPad Pros (but which, oddly, is not yet available for purchase separately). These chargers all use USB-C for output. So if want to use them to charge a Lightning device — like, say, your iPhone — you need a USB-C to Lightning cable, and your only certified options are Apple’s 1-meter and 2-meter cables. Apple’s cables aren’t bad, but (a) they cost $19 and $35, respectively; and (b) the 1-meter cable is awfully long to be the shortest cable for this. I like having 6-inch cables for traveling, for plugging my phone into my MacBook to charge overnight.

What’s the deal here? Is there a technical issue? Or is Apple just spitefully keeping this market to itself? It really seems like a raw deal when you consider that Apple still doesn’t include a USB-C to Lightning cable with new iPhones.

Categories: Apple (iOS/Mac OSX)