Search results for

“SwiftData inheritance relationship”

4,981 results found

Post

Replies

Boosts

Views

Activity

Swift in Objective C
After much frustration, reading, and googling, I finally got the magic incantation to add a Swift class to my ObjC code. You have to create the Swift class and eliminate all errors, then delete it from your project (not to trash) and drag it back in. Then, finally, I got it to add the magic interface file so it could be accessed.Another point -- The docs lie. The Swift class absoultely has to inherit from NSObject, or it will not allow you to add @objc to the file.
0
0
155
Oct ’15
Reply to Help Positioning Objects around another Object
Programmers prefer data to humans, and attempt to reduce humanity to data.They're not the only group of people to think this way, but they're the only ones able to implement mechanisms that actually do it.Unfortunately they're not particularly discerning about whom they do this for, nor to what ends and means.Hence many of our current predicaments.-----------There are so many ways this could evolve with 1000's of objects and their relationships that it's better to think of how to design that appearance for human consumption than to attempt to divine a way to articulate something discernible via a post presentation process of trial and error bending and blending of algorithms.But don't take my word for it. Just wait and see.Designers consider. That's why we do what we do 😉
Topic: Graphics & Games SubTopic: SceneKit Tags:
Oct ’15
Reply to iOS 9 Beta 3 - push notifications with extreme delay from Parse
Hi! As mentioned on the official documentation, IOS Push notifications are still a best effort service, the delays may not depend from your push notification provider, and may be inherited momentarily from Apple's system. We developed a service layer that returns a reliable feedback on each push notification's delivery status and we did not encounter differences in the daily latency between IOS versions, sorry!
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’15
Reply to ... and what about the gyros?
At rest the accelerometer seems to be quite stable. Only a few micro g's of noise. Accel sensors are inheritely prone to noise while in motion. Printing the time stamps between updates suggested a sample rate of 66 hz. Perhaps you could try a rolling average to smooth your tilt eq inputs. I haven't used the uikit animator yet. What's the name of that API?
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’15
Avoiding Faults in Core Data (Possible Bugs)
I work on an app that heavily relies on table views with NSFetchedResultsController.I've found that on users' devices, the app lags. On the kind of large data set that some of our users have on their devices, Instruments showed that `tableView:heightForRowAtIndexPath:` was the biggest culprit (in it, we check the value of a property and return a different height based on that). According to Instruments, this process led to faults being fired constantly.I'm trying to avoid this, I tried to use `returnsObjectsAsFaults = NO`, but that did nothing. Objects are still returned as faults. I'm guessing this is a bug, and I found references to it from years ago on Stack Overflow.That was the first issue.The second issue is that if I Cmd-click into the documentation for `NSFetchedRequest`, the comments on the `propertiesToFetch` property state the following:Specifies a collection of either NSPropertyDescriptions or NSString property names that should be fetched. The collection may represent attributes, to-one relationships
10
0
2.9k
Oct ’15
How to override supportedInterfaceOrientations
My code for Portrait/UpsideDown orientation in Xcode 7.0.1 Obj-C is:- (UIInterfaceOrientationMask)supportedInterfaceOrientations { return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown); }SLComposeViewController does not override supportedInterfaceOrientations and so it inherits the default implementation from UIViewController which returns UIInterfaceOrientationMaskAllButUpsideDown on iPhoneSo I created a subclass of SLComposeViewController, but now how do I override supportedInterfaceOrientations?
0
0
667
Oct ’15
Is it possible to override supportedInterfaceOrientations
My code for Portrait/UpsideDown orientation in iPhone6.m for Xcode 7.0.1 in Obj-C is:- (UIInterfaceOrientationMask)supportedInterfaceOrientations { return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown); }SLComposeViewController does not override supportedInterfaceOrientations and so it inherits the default implementation from UIViewController which returns UIInterfaceOrientationMaskAllButUpsideDown on iPhoneSo I created a subclass of SLComposeViewController, but now how do I override supportedInterfaceOrientations?
0
0
240
Oct ’15
Are there any conditions where launchctl doesn't start a program when it is supposed to?
Sometimes I see that firing the launchctl load /Library/LaunchAgents/com.xyz.plist command doesn't load the app at all. This happens rarely but are there any known conditions or situations where this command would fail? This happened when I installed a system update. After reboot the app didnt start. Is there any way to debug launchctl?The contents of the plist are:<dict><key>Label</key><string>com.xyz</string><key>ProgramArguments</key><array><string>/Applications/xyz.app/Contents/MacOS/xyz</string></array><key>EnvironmentVariables</key><dict><key>OPT</key><string>xyz</string></dict><key>ExitTimeOut</key><integer>10</integer><key>KeepAlive</key><dict><key>SuccessfulExit</key><false/> </dict><key>RunAtLoad</key><true/><key>EnableTransactions</key><false/>launchctl dumpstate says the STATE=WAITING.
0
0
2.6k
Oct ’15
Reply to Possible to call a Swift/ObjC function from TVJS?
I strongly suggest you to do the following[self.callback.context[@setTimeout] callWithArguments:@[callback, @0, items]];when you are going to send response to the JavaScriptCore counterpart. This will prevent the TVML UI MainThread to hang. As you can see it's a call of the setTimeout javascript function with delay 0, your callback and items as parameters like:setTimeout(callback,0,items)I'm not sure how you are creating the alert anyways here is one from Apple:createAlert : function(title, description) { var alertString = `<?xml version=1.0 encoding=UTF-8 ?> <document> <alertTemplate> <title>${title}</title> <description>${description}</description> <button class=btn_close> <text>OK</text> </button> </alertTemplate> </document>` var parser = new DOMParser(); var alertDoc = parser.parseFromString(alertString, application/xml); return alertDoc }There is no direct relationship with the alert and the behavior you are seeing he
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’15
Reply to Pressing the pause button a game controller takes me out of my game, instead of pausing it
If you inherit from GCEventViewController, you can set the controllerUserInteractionEnabled flag to true if you want the events to be routed through the normal responder chain, and false if you want it to send you all the events. When it is true, the menu button will exit the app -- it's the only way that I know of allowing the user to explicitly exit from your app (i.e. if you never set the flag to true, I think menu would never trigger an exit from your app). There's always the Home button, though, which should exit no matter what, and which we have no way of tapping into. Seems funny to me that there are so many buttons whose sole function is just to exit out of your app.All that being said, though, I'm having trouble when I toggle that flag -- even when set to true, it's still calling the button handlers for my underlying game handlers, which is causing some issues...
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’15
Reply to iPad Pro Designation...
This code will give you the device types.....and yes as nilPill says, you really really don't want to be scaling things individually like that. Use the Scene scaleMode, and if you need to scale assets you can add an SKNode as a World node that you can scale as a ratio from your 'standard' size. Then attach all your game nodes as children of the world node and they will all inherit that same scale. You then don't have to worry about different device sizes.import UIKit private let DeviceList = [ / iPod 5 */ iPod5,1: iPod Touch 5, / iPhone 4 */ iPhone3,1: iPhone 4, iPhone3,2: iPhone 4, iPhone3,3: iPhone 4, / iPhone 4S */ iPhone4,1: iPhone 4S, / iPhone 5 */ iPhone5,1: iPhone 5, iPhone5,2: iPhone 5, / iPhone 5C */ iPhone5,3: iPhone 5C, iPhone5,4: iPhone 5C, / iPhone 5S */ iPhone6,1: iPhone 5S, iPhone6,2: iPhone 5S, / iPhone 6 */ iPhone7,2: iPhone 6, / iPhone 6 Plus */ iPhone7,1: iPhone 6 Plus, / iPad 2 */ iPad2,1: iPad 2, iPad2,2: iPad 2, iPad2,3: iPad 2, iPad2,4: iPad 2, / iPad 3 */ iPad3,1: iPad 3, iPad
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Oct ’15
I NEED to remotely validate non-local users in an app.
I have a patented method that takes two users and they manually enter both of their fingerprint data's into BOTH phones. I need it to validate sexually transmitted disease blood test data, so users can make educated decisions about *** or future relationship decisions. I am pursuing a National Institutes of Health grant with a UConn behavioral researcher. I NEED to remotely send fingerprint data off of the phone to validate data to operate. I can see that Apple hasn't seen a legitimate application as to why it would be necessary, but I hope this can sell that need. How do I get Apple to change their system to accommodate this. I have proactively contacted the Federal Trade Commission, because even with some willing participants, it may be difficult to justify building an SDK, possibly just for me.
3
0
256
Oct ’15
How to transfer an error from swift to objective-c with description ?
Hi everyone,I am building a swift-based library, that can load configuration files.Of course, configuration files can contain errors, and I need to provide helpful feedback in such cases.I have declared error types, that inherits NSError, and I throw them with the required description when an error occures. It works great in swift.But when I use my library in Objective-C, the errors I receive does not contain any helpful information : userInfo is nil, the only thing I have is the domain and the code.What have I missed ? What should I do to have the userInfo transfered from the swift world to the objective-C ?Thanks for your help !Jerome
4
0
543
Oct ’15
Reply to How to transfer an error from swift to objective-c with description ?
It seems the current Swift runtime converts ErrorType object to NSError object by retrieving only domain and code, unless the ErrorType object is an instance of NSError. Even if the ErrorType class inherits NSError, this happens.So, if you want to pass userInfo to Objective-C part, you need to use NSError directly. Extensions would work.Also you better send a Bug Report.
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’15
Reply to iCloud Use Outside the Mac App Store? App killed because its use of com.apple.developer.ubiquity-container-identifiers entitlement.
I would think so...not really my area though.It's just a hunch because I can't think of any other reason why my app would be terminated by the system for using iCloud entitlements when signed with my developer iD, and this app would not be. Maybe some hocus pocus...if the app is signed from the same developer...with the same bundle id as one on the MAS, they just let it go through?Maybe it's undocumented but an intentional way to say hey you can get an iCloud container outside MAS but you have to at least have a version of the app also inside MAS. Or maybe whatever checking the system does, is simply not good enough and this is some sort of bug. Or maybe Apple has a really good relationship with this developer.
Oct ’15
Swift in Objective C
After much frustration, reading, and googling, I finally got the magic incantation to add a Swift class to my ObjC code. You have to create the Swift class and eliminate all errors, then delete it from your project (not to trash) and drag it back in. Then, finally, I got it to add the magic interface file so it could be accessed.Another point -- The docs lie. The Swift class absoultely has to inherit from NSObject, or it will not allow you to add @objc to the file.
Replies
0
Boosts
0
Views
155
Activity
Oct ’15
Reply to Help Positioning Objects around another Object
Programmers prefer data to humans, and attempt to reduce humanity to data.They're not the only group of people to think this way, but they're the only ones able to implement mechanisms that actually do it.Unfortunately they're not particularly discerning about whom they do this for, nor to what ends and means.Hence many of our current predicaments.-----------There are so many ways this could evolve with 1000's of objects and their relationships that it's better to think of how to design that appearance for human consumption than to attempt to divine a way to articulate something discernible via a post presentation process of trial and error bending and blending of algorithms.But don't take my word for it. Just wait and see.Designers consider. That's why we do what we do 😉
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Oct ’15
Reply to iOS 9 Beta 3 - push notifications with extreme delay from Parse
Hi! As mentioned on the official documentation, IOS Push notifications are still a best effort service, the delays may not depend from your push notification provider, and may be inherited momentarily from Apple's system. We developed a service layer that returns a reliable feedback on each push notification's delivery status and we did not encounter differences in the daily latency between IOS versions, sorry!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’15
Reply to ... and what about the gyros?
At rest the accelerometer seems to be quite stable. Only a few micro g's of noise. Accel sensors are inheritely prone to noise while in motion. Printing the time stamps between updates suggested a sample rate of 66 hz. Perhaps you could try a rolling average to smooth your tilt eq inputs. I haven't used the uikit animator yet. What's the name of that API?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’15
Avoiding Faults in Core Data (Possible Bugs)
I work on an app that heavily relies on table views with NSFetchedResultsController.I've found that on users' devices, the app lags. On the kind of large data set that some of our users have on their devices, Instruments showed that `tableView:heightForRowAtIndexPath:` was the biggest culprit (in it, we check the value of a property and return a different height based on that). According to Instruments, this process led to faults being fired constantly.I'm trying to avoid this, I tried to use `returnsObjectsAsFaults = NO`, but that did nothing. Objects are still returned as faults. I'm guessing this is a bug, and I found references to it from years ago on Stack Overflow.That was the first issue.The second issue is that if I Cmd-click into the documentation for `NSFetchedRequest`, the comments on the `propertiesToFetch` property state the following:Specifies a collection of either NSPropertyDescriptions or NSString property names that should be fetched. The collection may represent attributes, to-one relationships
Replies
10
Boosts
0
Views
2.9k
Activity
Oct ’15
How to override supportedInterfaceOrientations
My code for Portrait/UpsideDown orientation in Xcode 7.0.1 Obj-C is:- (UIInterfaceOrientationMask)supportedInterfaceOrientations { return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown); }SLComposeViewController does not override supportedInterfaceOrientations and so it inherits the default implementation from UIViewController which returns UIInterfaceOrientationMaskAllButUpsideDown on iPhoneSo I created a subclass of SLComposeViewController, but now how do I override supportedInterfaceOrientations?
Replies
0
Boosts
0
Views
667
Activity
Oct ’15
Is it possible to override supportedInterfaceOrientations
My code for Portrait/UpsideDown orientation in iPhone6.m for Xcode 7.0.1 in Obj-C is:- (UIInterfaceOrientationMask)supportedInterfaceOrientations { return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown); }SLComposeViewController does not override supportedInterfaceOrientations and so it inherits the default implementation from UIViewController which returns UIInterfaceOrientationMaskAllButUpsideDown on iPhoneSo I created a subclass of SLComposeViewController, but now how do I override supportedInterfaceOrientations?
Replies
0
Boosts
0
Views
240
Activity
Oct ’15
Are there any conditions where launchctl doesn't start a program when it is supposed to?
Sometimes I see that firing the launchctl load /Library/LaunchAgents/com.xyz.plist command doesn't load the app at all. This happens rarely but are there any known conditions or situations where this command would fail? This happened when I installed a system update. After reboot the app didnt start. Is there any way to debug launchctl?The contents of the plist are:<dict><key>Label</key><string>com.xyz</string><key>ProgramArguments</key><array><string>/Applications/xyz.app/Contents/MacOS/xyz</string></array><key>EnvironmentVariables</key><dict><key>OPT</key><string>xyz</string></dict><key>ExitTimeOut</key><integer>10</integer><key>KeepAlive</key><dict><key>SuccessfulExit</key><false/> </dict><key>RunAtLoad</key><true/><key>EnableTransactions</key><false/>launchctl dumpstate says the STATE=WAITING.
Replies
0
Boosts
0
Views
2.6k
Activity
Oct ’15
Reply to Possible to call a Swift/ObjC function from TVJS?
I strongly suggest you to do the following[self.callback.context[@setTimeout] callWithArguments:@[callback, @0, items]];when you are going to send response to the JavaScriptCore counterpart. This will prevent the TVML UI MainThread to hang. As you can see it's a call of the setTimeout javascript function with delay 0, your callback and items as parameters like:setTimeout(callback,0,items)I'm not sure how you are creating the alert anyways here is one from Apple:createAlert : function(title, description) { var alertString = `<?xml version=1.0 encoding=UTF-8 ?> <document> <alertTemplate> <title>${title}</title> <description>${description}</description> <button class=btn_close> <text>OK</text> </button> </alertTemplate> </document>` var parser = new DOMParser(); var alertDoc = parser.parseFromString(alertString, application/xml); return alertDoc }There is no direct relationship with the alert and the behavior you are seeing he
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’15
Reply to Pressing the pause button a game controller takes me out of my game, instead of pausing it
If you inherit from GCEventViewController, you can set the controllerUserInteractionEnabled flag to true if you want the events to be routed through the normal responder chain, and false if you want it to send you all the events. When it is true, the menu button will exit the app -- it's the only way that I know of allowing the user to explicitly exit from your app (i.e. if you never set the flag to true, I think menu would never trigger an exit from your app). There's always the Home button, though, which should exit no matter what, and which we have no way of tapping into. Seems funny to me that there are so many buttons whose sole function is just to exit out of your app.All that being said, though, I'm having trouble when I toggle that flag -- even when set to true, it's still calling the button handlers for my underlying game handlers, which is causing some issues...
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’15
Reply to iPad Pro Designation...
This code will give you the device types.....and yes as nilPill says, you really really don't want to be scaling things individually like that. Use the Scene scaleMode, and if you need to scale assets you can add an SKNode as a World node that you can scale as a ratio from your 'standard' size. Then attach all your game nodes as children of the world node and they will all inherit that same scale. You then don't have to worry about different device sizes.import UIKit private let DeviceList = [ / iPod 5 */ iPod5,1: iPod Touch 5, / iPhone 4 */ iPhone3,1: iPhone 4, iPhone3,2: iPhone 4, iPhone3,3: iPhone 4, / iPhone 4S */ iPhone4,1: iPhone 4S, / iPhone 5 */ iPhone5,1: iPhone 5, iPhone5,2: iPhone 5, / iPhone 5C */ iPhone5,3: iPhone 5C, iPhone5,4: iPhone 5C, / iPhone 5S */ iPhone6,1: iPhone 5S, iPhone6,2: iPhone 5S, / iPhone 6 */ iPhone7,2: iPhone 6, / iPhone 6 Plus */ iPhone7,1: iPhone 6 Plus, / iPad 2 */ iPad2,1: iPad 2, iPad2,2: iPad 2, iPad2,3: iPad 2, iPad2,4: iPad 2, / iPad 3 */ iPad3,1: iPad 3, iPad
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Oct ’15
I NEED to remotely validate non-local users in an app.
I have a patented method that takes two users and they manually enter both of their fingerprint data's into BOTH phones. I need it to validate sexually transmitted disease blood test data, so users can make educated decisions about *** or future relationship decisions. I am pursuing a National Institutes of Health grant with a UConn behavioral researcher. I NEED to remotely send fingerprint data off of the phone to validate data to operate. I can see that Apple hasn't seen a legitimate application as to why it would be necessary, but I hope this can sell that need. How do I get Apple to change their system to accommodate this. I have proactively contacted the Federal Trade Commission, because even with some willing participants, it may be difficult to justify building an SDK, possibly just for me.
Replies
3
Boosts
0
Views
256
Activity
Oct ’15
How to transfer an error from swift to objective-c with description ?
Hi everyone,I am building a swift-based library, that can load configuration files.Of course, configuration files can contain errors, and I need to provide helpful feedback in such cases.I have declared error types, that inherits NSError, and I throw them with the required description when an error occures. It works great in swift.But when I use my library in Objective-C, the errors I receive does not contain any helpful information : userInfo is nil, the only thing I have is the domain and the code.What have I missed ? What should I do to have the userInfo transfered from the swift world to the objective-C ?Thanks for your help !Jerome
Replies
4
Boosts
0
Views
543
Activity
Oct ’15
Reply to How to transfer an error from swift to objective-c with description ?
It seems the current Swift runtime converts ErrorType object to NSError object by retrieving only domain and code, unless the ErrorType object is an instance of NSError. Even if the ErrorType class inherits NSError, this happens.So, if you want to pass userInfo to Objective-C part, you need to use NSError directly. Extensions would work.Also you better send a Bug Report.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’15
Reply to iCloud Use Outside the Mac App Store? App killed because its use of com.apple.developer.ubiquity-container-identifiers entitlement.
I would think so...not really my area though.It's just a hunch because I can't think of any other reason why my app would be terminated by the system for using iCloud entitlements when signed with my developer iD, and this app would not be. Maybe some hocus pocus...if the app is signed from the same developer...with the same bundle id as one on the MAS, they just let it go through?Maybe it's undocumented but an intentional way to say hey you can get an iCloud container outside MAS but you have to at least have a version of the app also inside MAS. Or maybe whatever checking the system does, is simply not good enough and this is some sort of bug. Or maybe Apple has a really good relationship with this developer.
Replies
Boosts
Views
Activity
Oct ’15