Search results for

“SwiftData inheritance relationship”

4,981 results found

Post

Replies

Boosts

Views

Activity

Reply to NSPreidcate Use string to filter Core Data table
I did take a look but the project is empty. At a minimum please define your core data model and update the project so that it does show some of the things you've tried. If you do that then I can help you get past the hurdle with an actual code example that makes sense in the context of your project.If you need a better start try out the Simple Core Data Relationships sample project in Xcode (it's still called TaggedLocations). You will be able to see how two core data objects are modeled and how to add the related objects to each other in code. To find and open the sample, just go to your Help tab and open the Documentation ~ from there just search for the words I mentioned above.
Sep ’15
Reply to ios 9 in house app unable to install
Pooling together several solutions I have found a way to work around this:- Use the manifest plist generated automatically during the Archive process, and make sure you have valid install images supplied- Make sure your app has a valid trust relationship with iOS - Settings -> General -> Profile -> [Your companycertificate name under ENTERPRISE APP] -> Approve.- Restart your device before attempting an install as install requests seem to be cached- Rename / version your manifest and .ipa file to avoid caching, and update your download link accordinglyEdit:This is working for a number of our devices, but not all of them.Sources:__________________liron.slonSep 25, 2015 4:46 PM(in response to KENJI0523)Found the solution!After installing the app, go to:Settings -> General -> Profile -> [Your companycertificate name under ENTERPRISE APP] -> Approve.____________________http://stackoverflow.com/questions/32678253/ios9-unable-to-download-app
Sep ’15
Reply to The kernel killed my process (in the Library, with a lead pipe)
dgatwood,I eventually figured out what was going on.My process was started from a helper, that was started from an app, that was run in Xcode. What was happening is that Xcode had Zombies enabled, which the helper, and eventually the command process, managed to inherit via the environment. So my command process (which reads and writes millions of files) never deallocated anything!!!!I guess I should be lucky that I didn't find a molten crater on my desk where my MacPro originaly was.
Sep ’15
Reply to Major issue with SSL connections in iOS 9!
So I guess the question is: has anyone come up with a configuration that works for a java based server (Tomcat, Jboss (which I'm using), etc.) that works with iOS 9?Alas, I can’t help you there (but maybe someone else will chime in).BTW as side note: if anyone tried the NSAppTransportSecurity bypass option and couldn't get it to work, try adding the port number e.g., myservice.example.com:8443 -- didn't work for me until appended the port #I’m not sure what’s going on with your specific situation but a) this should not be necessary, b) it is not necessary in my experience, and c) I recommend against doing it because it runs counter to the documented specification of the ATS dictionary.When testing this myself I got confused by one thing that might explain the behaviour you’re seeing. When I configured my ATS dictionary I set my NSExceptionDomains to biff.local:12345 but I also had an NSAllowsArbitraryLoads value inherited from my project template. The “:12345” was causing ATS to ‘miss’ my NSException
Sep ’15
Request of help - blocked student
Hello to all!Here we are, I am student and I have to create a small project in Swift, only, I block..We had as this lesson:· A class « Personne »: this class will have to have three attributes (nom (String), prenom (String) and age (Int)). You will define a builder accepting three parameters who will allow to initialize our three attributes. Finally, you will define a method affiche() which will post the nom, the prone and the age of the person.For that, I obtain this code:class Personne { / var nom: String var prenom: String var age: Int init(nom: String, prenom: String, age: Int) { / self.nom = nom self.prenom = prenom self.age = age } func affiche() { / print(Etudiant : +self.nom, self.prenom) print(Age : (self.age)) } }Then:· A Etudiant class which inherits from the class Personne: this class will have for additional attributes type Bool's for bourse (Bool) and annee (Int). You will define a builder who will allow to initialize all the attributes of this class. You will also redefine the method a
1
0
253
Sep ’15
Uniqueness with to-one mandatory inverse relationship
Why entity cannot have uniqueness constraints with to-one mandatory inverse relationship?Having two entities:- Personproperty: namerelationship: department (to-one, non-optional)- Departmentproperty: title (unique constraint)relationship: person (to-many, optional)Model won't compile in iOS 9, XCode 7.0.1 with misconfigured entity error:Misconfigured Entity: Entity Department cannot have uniqueness constraints and to-one mandatory inverse relationship Person.department
8
0
3.8k
Sep ’15
Help with NSArrayController and Tabviews
Context: OSX EL Capitan GM Xcode 7 Xcode 7.1 beta Swift OSX Cocoa Application with both Document and CoreDataProblem: Trying to achive a one to many relationship between tabs in a NSTabViewController.Expected results: Select Parent item in a populated NSTableView on first tab, switch to second tab and see a NSTableView populated with children of that parent .Actual results: The Tables on both tab views are fully operational with creating/adding and deleting rows, however there is no relationship between the two. Meaning child rows are not filtered.Setup:Created a new Swift OSX application with Document and Core Data and Use Storyboard checked.Replaced the MainViewController with NSTabViewController (subClassed as MainTabViewController).Renamed first tab Profiles and created a subclass of NSViewController named ProfilesViewController with a Title of Profiles View Controller and assigned the tab view to have that class in IB identity inspector.Renamed the second tab Commands and created a subc
2
0
1.2k
Sep ’15
Reply to tvOS: Address Sanitizer Detected
It's a new XCode 7 feature for testing. You may have had it enabled by default or submitted a build that had it.See https://developer.apple.com/library/prerelease/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_7_0.htmlAddress sanitizer. Xcode 7 can build your app with instrumentation designed to catch and debug memory corruption using the address sanitizer.Objective-C and C code is susceptible to memory corruption issues such as stack and heap buffer overruns and use-after-free issues. When these memory violations occur, your app can crash unpredictably or display odd behavior. Memory corruption issues are difficult to track down because the crashes and odd behavior are often hard to reproduce, and the cause can be far from the origin of the problem.You enable the address sanitizer in the build scheme. Once enabled, added instrumentation is built into the app to catch memory violations immediately, enabling you to inspect the problem right at the place where it occurs. Other diagnost
Sep ’15
Reply to Help with Understanding Core Data
sqlite is the most widely used SQL database in the world. It ships on every cell phone and probably every personal computer. The source code fits into one C source code file. You can learn more about it at sqlite.org. Apple ships a version of sqlite on iOS and Macintosh that has been optimized for use on those computers. Use the FMDB Objective-C wrapper for sqlite if you want to do SQL programming on iOS.Core Data is an Apple technology that is an object store. It's a lot like a relational database with Entities and the standard relationships between entitites. sqlite is one of the available backing stores for Core Data. In reality there's probably no reason to use Core Data unless you're going to use sqlite as the backing store. I would recommend using the Core Data tutorials at www.raywenderlich.com to learn how to use Core Data.
Sep ’15
Reply to Screensaver, initWithFrame:isPreview: is being called on the wrong class
I had some time to look at this a bit more. I was able to get this working. Ignore my #1 in my other post, I think that's a red herring. I had typed the wrong principalClass name (at first I didn't have the module name, and then I puth the wrong module name in). #2 does appear to be required. With that set, the correct fully qualified module name, and then the appropriate inheritance from ScreenSaverView, then I was able to do a simple screen saver based off of the template code that just filled the screen with a solid color in the drawRect method.
Topic: UI Frameworks SubTopic: AppKit Tags:
Oct ’15
Reply to Screensaver, initWithFrame:isPreview: is being called on the wrong class
I have been experimenting with this some more. Here is the wholly bizarre state of affairs1. If I have a single class in the project, and it's inheriting from ScreenSaverView (and I set Embedded Swift Code, Code Signing and Principal class correctly), it works I can do some simple drawing.2. If I add in any additional swift classes the View class gets ignored and the ScreenSaver App tries to call the selector on one of them.3. If I derive these classes from NSObject, I don't get a crash (probably just happily swallowing a null selector now), but it still fails to init the View Class and I get the message about the plugin being incompatible.4. I also tried making my classes structs, but I couldn't do them all because I have some some actual polymorphism I need to retain, so I don't know..So then I tried a Screensaver someone else wrote called Timesaver I think. It was a single View class so I refactored it a bit so it has a couple of switft classes. This project works fine, in all the arrangements I t
Topic: UI Frameworks SubTopic: AppKit Tags:
Oct ’15
Can't build: "An unknown error has occurred"
Hello all,Honestly, I've exhausted all my ideas and strategies, so hoping someone can help.- I have a project, a FileMaker plug-in written in C++. It builds fine in OS 10.6.8/Xcode 3.2. This plug-in is a utimately a package with a shared library inside.- I need to test and debug in OS 10.10. The project opens in Xcode 6.4. However, the Build For commands are all grayed. Compile puts up the informative modal dialog, An unknown error has occurred.- There is no explanation of this error in the Issues tab or Console, which are the only places I know where to look.- I have gone over the build setting uncountable times and spotted no problems. Changed project format to Xcode 6.3. Renamed project using file pane. Uttered curses and incantations. However, see next.- I suspect some kind of path configuration issue. However, in Xcode 6, I can no longer see what various paths expand to. When the path is long, the expansion is cut off in a short field, boxed in by various panes, and ultimatey by the width of my screen. T
3
0
5.5k
Oct ’15
Reply to NSPreidcate Use string to filter Core Data table
I did take a look but the project is empty. At a minimum please define your core data model and update the project so that it does show some of the things you've tried. If you do that then I can help you get past the hurdle with an actual code example that makes sense in the context of your project.If you need a better start try out the Simple Core Data Relationships sample project in Xcode (it's still called TaggedLocations). You will be able to see how two core data objects are modeled and how to add the related objects to each other in code. To find and open the sample, just go to your Help tab and open the Documentation ~ from there just search for the words I mentioned above.
Replies
Boosts
Views
Activity
Sep ’15
Reply to ios 9 in house app unable to install
Pooling together several solutions I have found a way to work around this:- Use the manifest plist generated automatically during the Archive process, and make sure you have valid install images supplied- Make sure your app has a valid trust relationship with iOS - Settings -> General -> Profile -> [Your companycertificate name under ENTERPRISE APP] -> Approve.- Restart your device before attempting an install as install requests seem to be cached- Rename / version your manifest and .ipa file to avoid caching, and update your download link accordinglyEdit:This is working for a number of our devices, but not all of them.Sources:__________________liron.slonSep 25, 2015 4:46 PM(in response to KENJI0523)Found the solution!After installing the app, go to:Settings -> General -> Profile -> [Your companycertificate name under ENTERPRISE APP] -> Approve.____________________http://stackoverflow.com/questions/32678253/ios9-unable-to-download-app
Replies
Boosts
Views
Activity
Sep ’15
Reply to The kernel killed my process (in the Library, with a lead pipe)
dgatwood,I eventually figured out what was going on.My process was started from a helper, that was started from an app, that was run in Xcode. What was happening is that Xcode had Zombies enabled, which the helper, and eventually the command process, managed to inherit via the environment. So my command process (which reads and writes millions of files) never deallocated anything!!!!I guess I should be lucky that I didn't find a molten crater on my desk where my MacPro originaly was.
Replies
Boosts
Views
Activity
Sep ’15
Reply to Major issue with SSL connections in iOS 9!
So I guess the question is: has anyone come up with a configuration that works for a java based server (Tomcat, Jboss (which I'm using), etc.) that works with iOS 9?Alas, I can’t help you there (but maybe someone else will chime in).BTW as side note: if anyone tried the NSAppTransportSecurity bypass option and couldn't get it to work, try adding the port number e.g., myservice.example.com:8443 -- didn't work for me until appended the port #I’m not sure what’s going on with your specific situation but a) this should not be necessary, b) it is not necessary in my experience, and c) I recommend against doing it because it runs counter to the documented specification of the ATS dictionary.When testing this myself I got confused by one thing that might explain the behaviour you’re seeing. When I configured my ATS dictionary I set my NSExceptionDomains to biff.local:12345 but I also had an NSAllowsArbitraryLoads value inherited from my project template. The “:12345” was causing ATS to ‘miss’ my NSException
Replies
Boosts
Views
Activity
Sep ’15
Request of help - blocked student
Hello to all!Here we are, I am student and I have to create a small project in Swift, only, I block..We had as this lesson:· A class « Personne »: this class will have to have three attributes (nom (String), prenom (String) and age (Int)). You will define a builder accepting three parameters who will allow to initialize our three attributes. Finally, you will define a method affiche() which will post the nom, the prone and the age of the person.For that, I obtain this code:class Personne { / var nom: String var prenom: String var age: Int init(nom: String, prenom: String, age: Int) { / self.nom = nom self.prenom = prenom self.age = age } func affiche() { / print(Etudiant : +self.nom, self.prenom) print(Age : (self.age)) } }Then:· A Etudiant class which inherits from the class Personne: this class will have for additional attributes type Bool's for bourse (Bool) and annee (Int). You will define a builder who will allow to initialize all the attributes of this class. You will also redefine the method a
Replies
1
Boosts
0
Views
253
Activity
Sep ’15
Uniqueness with to-one mandatory inverse relationship
Why entity cannot have uniqueness constraints with to-one mandatory inverse relationship?Having two entities:- Personproperty: namerelationship: department (to-one, non-optional)- Departmentproperty: title (unique constraint)relationship: person (to-many, optional)Model won't compile in iOS 9, XCode 7.0.1 with misconfigured entity error:Misconfigured Entity: Entity Department cannot have uniqueness constraints and to-one mandatory inverse relationship Person.department
Replies
8
Boosts
0
Views
3.8k
Activity
Sep ’15
Reply to Swift 1.2 protocols and optional functions
Just curious, why can protocols provided by Apple define optional functions without @objc ?For example, UIImagePickerControllerDelegate has two optional functions, but there are no @objc.I tried to omit @objc by making my own protocol inherit from NSObjectProtocol, but I couldn't.
Replies
Boosts
Views
Activity
Sep ’15
Help with NSArrayController and Tabviews
Context: OSX EL Capitan GM Xcode 7 Xcode 7.1 beta Swift OSX Cocoa Application with both Document and CoreDataProblem: Trying to achive a one to many relationship between tabs in a NSTabViewController.Expected results: Select Parent item in a populated NSTableView on first tab, switch to second tab and see a NSTableView populated with children of that parent .Actual results: The Tables on both tab views are fully operational with creating/adding and deleting rows, however there is no relationship between the two. Meaning child rows are not filtered.Setup:Created a new Swift OSX application with Document and Core Data and Use Storyboard checked.Replaced the MainViewController with NSTabViewController (subClassed as MainTabViewController).Renamed first tab Profiles and created a subclass of NSViewController named ProfilesViewController with a Title of Profiles View Controller and assigned the tab view to have that class in IB identity inspector.Renamed the second tab Commands and created a subc
Replies
2
Boosts
0
Views
1.2k
Activity
Sep ’15
Reply to tvOS: Address Sanitizer Detected
It's a new XCode 7 feature for testing. You may have had it enabled by default or submitted a build that had it.See https://developer.apple.com/library/prerelease/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_7_0.htmlAddress sanitizer. Xcode 7 can build your app with instrumentation designed to catch and debug memory corruption using the address sanitizer.Objective-C and C code is susceptible to memory corruption issues such as stack and heap buffer overruns and use-after-free issues. When these memory violations occur, your app can crash unpredictably or display odd behavior. Memory corruption issues are difficult to track down because the crashes and odd behavior are often hard to reproduce, and the cause can be far from the origin of the problem.You enable the address sanitizer in the build scheme. Once enabled, added instrumentation is built into the app to catch memory violations immediately, enabling you to inspect the problem right at the place where it occurs. Other diagnost
Replies
Boosts
Views
Activity
Sep ’15
Reply to Help with Understanding Core Data
sqlite is the most widely used SQL database in the world. It ships on every cell phone and probably every personal computer. The source code fits into one C source code file. You can learn more about it at sqlite.org. Apple ships a version of sqlite on iOS and Macintosh that has been optimized for use on those computers. Use the FMDB Objective-C wrapper for sqlite if you want to do SQL programming on iOS.Core Data is an Apple technology that is an object store. It's a lot like a relational database with Entities and the standard relationships between entitites. sqlite is one of the available backing stores for Core Data. In reality there's probably no reason to use Core Data unless you're going to use sqlite as the backing store. I would recommend using the Core Data tutorials at www.raywenderlich.com to learn how to use Core Data.
Replies
Boosts
Views
Activity
Sep ’15
Reply to watchOS 2 with Core Data
try to select the model file and add target relationship to the watch extension? I m currently able to reference mohd now
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’15
Reply to Screensaver, initWithFrame:isPreview: is being called on the wrong class
I had some time to look at this a bit more. I was able to get this working. Ignore my #1 in my other post, I think that's a red herring. I had typed the wrong principalClass name (at first I didn't have the module name, and then I puth the wrong module name in). #2 does appear to be required. With that set, the correct fully qualified module name, and then the appropriate inheritance from ScreenSaverView, then I was able to do a simple screen saver based off of the template code that just filled the screen with a solid color in the drawRect method.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’15
Reply to Screensaver, initWithFrame:isPreview: is being called on the wrong class
I have been experimenting with this some more. Here is the wholly bizarre state of affairs1. If I have a single class in the project, and it's inheriting from ScreenSaverView (and I set Embedded Swift Code, Code Signing and Principal class correctly), it works I can do some simple drawing.2. If I add in any additional swift classes the View class gets ignored and the ScreenSaver App tries to call the selector on one of them.3. If I derive these classes from NSObject, I don't get a crash (probably just happily swallowing a null selector now), but it still fails to init the View Class and I get the message about the plugin being incompatible.4. I also tried making my classes structs, but I couldn't do them all because I have some some actual polymorphism I need to retain, so I don't know..So then I tried a Screensaver someone else wrote called Timesaver I think. It was a single View class so I refactored it a bit so it has a couple of switft classes. This project works fine, in all the arrangements I t
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’15
Can't build: "An unknown error has occurred"
Hello all,Honestly, I've exhausted all my ideas and strategies, so hoping someone can help.- I have a project, a FileMaker plug-in written in C++. It builds fine in OS 10.6.8/Xcode 3.2. This plug-in is a utimately a package with a shared library inside.- I need to test and debug in OS 10.10. The project opens in Xcode 6.4. However, the Build For commands are all grayed. Compile puts up the informative modal dialog, An unknown error has occurred.- There is no explanation of this error in the Issues tab or Console, which are the only places I know where to look.- I have gone over the build setting uncountable times and spotted no problems. Changed project format to Xcode 6.3. Renamed project using file pane. Uttered curses and incantations. However, see next.- I suspect some kind of path configuration issue. However, in Xcode 6, I can no longer see what various paths expand to. When the path is long, the expansion is cut off in a short field, boxed in by various panes, and ultimatey by the width of my screen. T
Replies
3
Boosts
0
Views
5.5k
Activity
Oct ’15
Reply to Add and edit a UITabBarItem in Interface Builder
Add a view controller to the storyboard.Add a relationships segue from the tab bar controller to the new view controller.Set the title of the new view controller's Tab Bar Item.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’15