Search results for

A Summary of the WWDC25 Group Lab

10,094 results found

Post

Replies

Boosts

Views

Activity

Reply to WatchKit settings bundle in 2.0?
NSUserDefaults (even with an App Groups) don't sync between the iPhone and the Watch. If you want to sync settings from either your iPhone app or the Settings-Watch.bundle, you have to handle the syncing yourself.I've found that using WatchConnectivity's user info transfers works really well in this case.Below you'll find an example of how you could implement this. The code only handles one-way syncing from the phone to the Watch, but the other way works the same.In the iPhone app:1) Prepare dictionary of settings that need to be synced- (NSDictionary *)exportedSettingsForWatchApp { NSUserDefaults *userDefaults = [self userDefaults]; // the user defaults to sync NSSet *keys = [self userDefaultKeysForWatchApp]; // set of keys that need to be synced NSMutableDictionary *exportedSettings = [[NSMutableDictionary alloc] initWithCapacity:keys.count]; for (NSString *key in keys) { id object = [userDefaults objectForKey:key]; if (object != nil) { [exportedSettings setObject:object forKey:key]; } } return [ex
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’15
Push configuration profiles
Hello there smart programmers,Here is a summary of what we have so far:- our own Apple developer Enterprise membership- mac OSX Server (4.1.3) running on a mac mini- our own DEP account activated at (deploy.apple.com), our server and one ios device linked to it- The latest documentation of the MDM Protocols (2015-07-13)So far, via the apple developer API's, we can consume the DEP Web Services (List Account details, Fetch Devices etc...).What we need is to be able to create configuration profiles, and push those profiles into our own devices, can any of you guide us trough the steps to do so?Kind Regards,Actacom Nederland B.V.
1
0
358
Aug ’15
Is there an implicit ordering to thread group execution?
In a compute (kernel) function, is there an implicit ordering to threadgroup execution.Say I have a 32xN buffer. Take following trivial kernel (ignoring boundary conditions):kernel void example(device uint *buffer [[ buffer(0) ]], const uint2 pos [[ thread_position_in_grid ]]) { uint index = pos.y * N + pos.x; buffer[i - 1] = buffer[i] buffer[i + 1] = 0; }If we dispatch that kernel in N 32x1 threadgroups, is there any way that the thread groups are executed left-to-right? i.e. the resulting buffer is all 0 (once again, ignoring the boundary conditions).Thanks
2
0
478
Aug ’15
Reply to iCloud Notes Recently Deleted Folder Moved
You said that you weren't looking for a fix, but moving the following 2 plist files to the desktop will cause them to be created anew and should fix your issue. The procedure is reversible so there's nothing to lose. Close Notes then, from Finder, press shift+cmd+G and then copy-paste the following in:~/Library/Containers/com.apple.Notes/Data/Library/Preferences/com.apple.Notes.plistMove the selected file to the desktop. Repeat with:~/Library/Group Containers/group.com.apple.notes/Library/Preferences/group.com.apple.notes.plistRestart your Mac and see if it's fixed. Let me know if it works 🙂-Max.
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’15
Universal App - CGPointMake
This is my code for the background chessboard. I need three different images, which is fine. if deviceType == iPad { backImagePad.anchorPoint = CGPointMake(0.5, 0.5) backImagePad.size.height = self.size.height backImagePad.size.width = self.size.width backImagePad.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame)) self.addChild(backImagePad) } if (deviceType == iPhone5 || deviceType == iPhone6) { backImagePhone5.anchorPoint = CGPointMake(0.5, 0.5) backImagePhone5.size.height = self.size.height backImagePhone5.size.width = self.size.width backImagePhone5.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame)) self.addChild(backImagePhone5) } if (deviceType == iPhone) { backImagePhone.anchorPoint = CGPointMake(0.5, 0.5) backImagePhone.size.height = self.size.height backImagePhone.size.width = self.size.width backImagePhone.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMidY(self.frame)) self.addChild(backImagePhone) }However, to individually position th
1
0
412
Aug ’15
xcodebuild archive fails ITMS validation
Our app has a watchkit app + extension. Archives from XCode IDE always pass iTunes store validation. However archives generated via xcodebuild command tools (Xcode 6.4; Build version 6E35b) fail this validation with the following errors:ERROR ITMS-90163: Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'aps-environment' in 'Payload/TheDodo.app/PlugIns/DodoExtension.appex/DodoExtension'. ERROR ITMS-90164: Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '##########.###.##########.######' for the key 'application-identifier' in 'Payload/TheDodo.app/PlugIns/TheDodoWatchKitExtension.appex/TheDodoWatchKitExtension' ERROR ITMS-90163: Invalid Code Sig
4
0
5.7k
Aug ’15
ClockKit: Complications animations not working as documented
I recently added support for Time Travel in my complications and everything is working as expected, but the complications are always animating instead of just when the group identifier changes.For example I'm using a ring template with some text and I don't want to have the complication animate when just the text changes. Therefore I'm using the same identifier for all timeline entries when only the text changes.But this isn't working correctly.Is this a known problem with watchOS 2 beta 5? Or is it just the Simulator? I couldn't test it on an actual device yet.I'm specifying CLKComplicationTimelineAnimationBehaviorGrouped as the animation behavior for all complications:- (void)getTimelineAnimationBehaviorForComplication:(CLKComplication *)complication withHandler:(void(^)(CLKComplicationTimelineAnimationBehavior behavior))handler { handler(CLKComplicationTimelineAnimationBehaviorGrouped); }And this is how I create the timeline entries for Time Travel using the same identifier, of course:CLKComplicat
3
0
1.2k
Aug ’15
Reply to dataTaskWithRequest problem - can't debug it
After further investigation in the documentation I realized session.dataTaskWithRequest is highly asyncronous, and since I need the funcions to be syncronous, I modified my code as following and it worked for me, so I'm publishing it here so maybe it could help others... func isSessionEnabledForUsername(theUsername: String,completion: ((success:Bool, error:NSError!) -> Void)!){ let url = NSURL(string: http:/...) let request: NSURLRequest = NSURLRequest(URL: url!) let config = NSURLSessionConfiguration.defaultSessionConfiguration() let session = NSURLSession(configuration: config) var statusCode = -1 let group = dispatch_group_create() dispatch_group_enter(group) session.dataTaskWithRequest(request, completionHandler: {responseData, response, error -> Void in if let httpResponse = response as? NSHTTPURLResponse { statusCode = httpResponse.statusCode } dispatch_group_leave(group) }).resume() dispatch_group_wait(group, DISPATCH_TIME_FOREVER) if statusCode == 403 { comple
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’15
Reply to El Capitan Beta 6 Safari Launches on its own
Max,Thanks - this helped and it solved another mystery; where had all my storage gone since installing 10.11 Developer Beta. I am running 10.11 on a 2014 MacBook Air with 120 GB storage. I had over 40GB free and after all the beta installs I was down to 9GB. Since moving this file and deleting what I could (more on that in a moment) I recovered about 29GB of space.I can't delete the directory totaly. Not even when booted from another drive, via the terminal as root. There are three directories (/Applications) that tell me they are in use and can't be deleted. I was able to delete most of the other files. For some reason there is a backup of CrashPlan that absolutely refuses to be deleted. I've changed the group and owner permissions to my user thinking that might have something to do with it. No luck so far, but since it only takes up a few k of space I'm not terribly worried about it. Once El Capitan is released I will wipe this system and do a clean install anyway.I have noticed my drive space decr
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’15
Sharing preferences with iPhone and Today extension
I have some preferences that are currently stored in the main app's Settings bundle. These are global settings that should affect my iOS app, Today extension, and watchOS 2 app. I am able to share settings with the widget by using app groups and shared NSUserDefaults, but how can I now share those settings with the watchOS 2 app? If it's not possible to share these same settings with the watch, I would accept duplicating them and adding them to the Watch app (they may want to have different settings for the watch anyways). But if I do that I'm not sure how to access them from within a watchOS 2 app. What do you suggest?
1
0
1.1k
Aug ’15
Reply to How to set Equatable in protocols
Great, this is a nice solution! So, as a summary, I believe the best that can be done with Swift 2 today is:Make all implementations of `Term` conform to `Equatable` via the extensions for `Equatable` and the polymorhic `==`Provide a monomorphic `==` function (your last version) that works for `Term` values in general (and that can be used in functions like `highlightTerm`)If there are use cases that require `Term` to be `Equatable`, then the usual workaround via a generic `AnyTerm` implementation needs to be done.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’15
Recovery HD missing (El Capitan Beta 6)
I've been testing El Capitan Beta 6 on a MacBook Air and I found one issue that I hope someone can confirm is a bug, or maybe I'm just doing something wrong.Starting with a USB bootable El Capitan Beta installer, initialize the SSD target drive, then install El Capitan, then go through the tedious/painful process of having 10+ GBs of updates pulled down (just a guess), until we are at El Capitan Beta 6.Right off the bat I notice Recoverey HD is missing.Running diskutil list shows Macintosh HD is there, but not Recovery HD.Running diskutil cs list returns No CoreStorage logical volume groups found.I booted off the USB bootable El Capitan Beta installer and created a DMG using both New image from Macintosh HD and New image from folder... this way I can at least restore Macintosh HD at a later date if necessary (fully updated to Beta 6).I didn't bother to create an image from the SSD, since it is missing Recovery HD. Ideally I should be able to, to capture both Macintosh HD and Recovery HD.I'll probably
3
0
11k
Aug ’15
Reply to Verisign Certificates?/AppStore,iTunes Connections, and a clueless Hoss.
First, a couple of possible fixes that are nice and easy to try:Open Keychain Access again and press alt + cmd + A. Then enter your password and start the repair.System Preferences > Date & Time > Set date and time automatically and select one of the Apple time servers.If, after a few minutes, App Store and iTunes still won't connect, then it's time for some diagnostics:Reboot your computer in Safe Mode by holding the shift key immediately after switching on and holding it until you see the progress bar. Please let me know if you can connect in this mode...Create a temporary new admin account from System Preferences > Users & Groups > Open Padlock > + button. Log into the new account and test connectivity there too and, again, let me know the results...Boot normally and then, for each of the two lines below: select it then right-click it and go to Services > Show info in finder.The dialog should show You can only read in the Sharing & Permissions section - let me know if
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’15
Reply to Recovery HD missing (El Capitan Beta 6)
@Max108 thanks for your response. I'm one of those techs who saves everything as he works, so I have the latest El Capitan Beta installer app.I downloaded the El Capitan Beta Installer app to /Applications on the MacBook Air test machine.Then I downloaded the AppleScript app and ran it, and I skipped past the error:You are not running a compatible version of OS XI hit OK and selected the target disk Macintosh HD > OK. The next dialog box I got is:We will now check your drive for errors. You can skip this but it is not recommendedI hit OK and gave it less than a minute (because SSD), then got:We are about to start the recovery creation process. Click OK to continue and choose the OS version you are going to install when prompted.I hit OK and after a few seconds I got this dialog:Choose OS Installer Version [10.7 or 10.8] [10.9]Since we are installing 10.11, I took a chance and chose 10.9. Got Creating Recovery artition. This is going to take a bit. with an Abort Recovery Partition button that for obvious re
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’15
Reply to iCloud Notes Recently Deleted Folder Moved
Okay, well the above was an attempt at a surgical fix. The following (slightly less surgical fix) is also reversible so there's still nothing to lose:Close Notes then, from Finder, press shift+cmd+G and then copy-paste the following in, one at a time, and move the selected file/directory to the desktop as before:~/Library/Containers/com.apple.Notes~/Library/Group Containers/group.com.apple.notes~/Library/Containers/com.apple.Notes/Data/Library/Saved Application State/com.apple.Notes.savedState
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’15