Android App on Google Play
Pinner for Android gets a slightly-earlier-than-advertised release. Go check it out!

@theartofmadeline

Product Placement
styofa doing anything
Lint Roller? I Barely Know Her

Kaledo Art
TVSTRANGERTHINGS
Monterey Bay Aquarium
Cosmic Funnies

Kiana Khansmith
almost home
KIROKAZE
Game of Thrones Daily
Misplaced Lens Cap
Show & Tell
Alisa U Zemlji Chuda
he wasn't even looking at me and he found me

⁂

★

Discoholic 🪩
PUT YOUR BEARD IN MY MOUTH
seen from Italy
seen from United States
seen from Japan

seen from Malaysia

seen from United States
seen from Canada

seen from United States

seen from Malaysia

seen from Germany

seen from United States

seen from Poland
seen from United States
seen from United Kingdom

seen from Türkiye
seen from Brazil
seen from Malaysia
seen from Denmark

seen from Ukraine
seen from Maldives

seen from Sweden
@sam-oakley
Android App on Google Play
Pinner for Android gets a slightly-earlier-than-advertised release. Go check it out!
Pinner for Apple Watch
Following Apple’s accouncement of their event on March 9, I’d like to introduce Pinner - for Apple Watch.
Pinner for Apple Watch brings bookmark discovery to your wrist. Quickly check out the popular and recent bookmarks from Pinboard. Search for bookmark tags using your voice. And see bookmarks from your network - from other Pinboard users you follow.
Pinner for Apple Watch will be launching soon.
Sharing Core Data between App and Extension in iOS 8
There isn't much documentation on sharing data between apps and their extensions at the moment. Apple's own guide only details using NSUserDefaults, and gives this hilariously vague advice for other methods:
Alternatively, you can also use Core Data, or in some cases SQLite, to help coordinate data access in a shared container.
But how? Well, it turns out it isn't so hard. I'm going to assume you've created an extension using the File > New Target > Application Extension wizard.
Enable app groups
As in the advice for NSUserDefaults, first you must enable App Groups.
Select your App's target in Xcode, and go to the "Capabilities" tab.
Scroll down to the "App Groups" section, and hit the + button.
Enter a name for your App Group, usually beginning group.x. Xcode will do some communicating with the dev centre to create the group.
Now select your Extension's target, and do the same. Make sure that the group name you enter is identical.
This allows the data to be shared, but does nothing for the actual model, in the form of the .momd/.xcdatamodeld file. This resides in your App's bundle, which is not accessible from the Extension. You could actually copy the file, but better to just add the existing one to the Extension's bundle as well.
Select your Extension's target and go to the "Build Phases" tab.
Expand the "Copy Bundle Resources" section.
Hit the "+" and select the .xcdatamodel/.xcdatamodeld from your Extension.
Now when the stack is initialised, both the App and the Extension will know the model and be able to load your data from disk.
Share files
Now you have a shared group, you have a folder on device that both the app and extension can access. This means that you can create the Core Data store in that location and both will be able to read and write to it.
Where you initialise your Core Data stack, you'll be adding a store to your persistentStoreCoordinator a little something like this:
<?prettify>
[persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error]
It's simply a matter of changing your previous value for storeURL (usually somewhere in NSDocumentDirectory) to a location contained in your shared App Group folder. You do this using containerURLForSecurityApplicationGroupIdentifier:
<?prettify>
NSURL *directory = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:@"group.YourGroupName"]; NSURL *storeURL = [directory URLByAppendingPathComponent:@"YourAppName.sqlite"];
Setting up the stack
To use Core Data from your extension, you will have to set up your stack from your extension as well. Ideally, you can use the same code from your app. The default stack created by Xcode is contained within your AppDelegate, so it's probably best to move this to another location that can be better shared, since using UIApplication is a compiler error in an Extension.
There you go! You'll be able to read and write your data from your Extension.
If you're interested in an alternative stack for Core Data, check out SQKDataKit on GitHub.
I don't like you. I never liked you. And the only reason I gave you that valentine is that nobody else would!
I’ll be in Mexico until this thing blows over.
Breathe through your damn mouth!
Free wig with every purchase of large wig. Downtown Wig Center.