Search results for

“SwiftData inheritance relationship”

4,981 results found

Post

Replies

Boosts

Views

Activity

Reply to Implementing Data Protection
1. If you don't have the data protection entitlement on for your AppID, does this mean that adding NSDataWritingFileProtectionComplete to your code will not provide any protection?No. The entitlement sets the default value for your container, and hence for anything created within your container. You can always override that default programmatically (via NSDataWritingFileProtectionComplete or any of the other data protection APIs). 2. If you do have the data protection entitlement enabled in your AppID, and you have set that entitlement to Protected Until First User Authentication, is this the default level of protection?Yes, but see below.Can you still choose a higher level of data protection like NSDataWritingFileProtectionComplete for particular files?Yes.Be aware that the definition of default is more subtle than you might think. By default the data protection value is inherited from the parent directory when you create an item. For example, if you have a directory set to NSFileProtectionComplete,
Topic: App & System Services SubTopic: General Tags:
Oct ’15
Infomation Needed developer's relationship to my app?
Information NeededWe began the review of your app but aren't able to continue because we need additional information about your app.At your earliest opportunity, please review the following question(s) and provide as much detailed information as you can. The more information you can provide upfront, the sooner we can complete your review.1. What is the developer's relationship to Kim? Please provide detailed information.------------------------------------------------------------------------------------------------------------------------------Kim is our client. He requested me to make this app. (his personal app, He is a celebrity.)Is this infomation above enough? I don't know what kind of detail information apple reviewer want? Thank for your help.
1
0
155
Oct ’15
Reply to Illegal attempt to establish a relationship problem.
Thanks a lot. You solved my problem.When pass ManagedObject from last viewcontroller , it need to retrive it from managedContext(backgroundContext)let objectID = schedule.objectID let belongSchedule = self.cdh.backgroundContext?.objectWithID(objectID) as! Schedule newDailyPlan.schedule = belongSchedule // schedule is relationship self.cdh.saveContext(self.cdh.backgroundContext!)
Oct ’15
ld: library not found for -lReactiveCocoa
Here is my problem:I`ve got a project already,today i had it cococPods managed for i want to useReactiveCocoa in my project.After i set up the pod,and build it,this error occured;ld: library not found for -lReactiveCocoaI have checked the Target`s Library Search Paths setting ,it seems allright;$(inherited)So i was confused.I want to konw where did it inhrit with?
0
0
541
Nov ’15
Feature Request: A way to do a kinda half-way typealias
(This is part of my larger desire for Swift to have explicit code-generation support, since we don't get macros anymore)For instance, say I've defined a Point type:struct Point2D<T: ScalarType> : CustomStringConvertible, Equatable { //Yes, I know there's no such protocol as ScalarType. Hint, hint... nudge, nudge... var x: T var y: T var description: String { return ((x), (y)) } } func == <T: ScalarType> (lhs: Point2D<T>, rhs:Point2D<T>)-> Bool { return lhs.x == rhs.x && lhs.y == rhs.y }and I want a Vector2D type. The easiest way would be a typealias:typealias Vector2D = Point2D<Double>But then when I write the dot product functionfunc * (lhs: Vector2D, rhs: Vector2D) -> Double { return lhs.x * rhs.x + lhs.y * rhs.y }... code likelet v = Vector2D(x: 3.0, y: 1.2) let p = Point2D(x: 1.0, y: 1.3) let foo = v * p... will compile even though, at least semantically speaking, it breaks Swift's type-safety.Obviously, this is a pretty trivial example, but in the general sense
2
0
446
Nov ’15
Problem with Swift 2.1 and UIUserNotificationSettings
I'm new to app development and have inherited a project which I am currently updating to Swift 2.1.I've cleaned up all compile errors except this last one, and need some help. The section of code I'm having problems with is as follows:if application.respondsToSelector(registerUserNotificationSettings:) { let testAction = UIMutableUserNotificationAction() testAction.identifier = TEST_ACTION testAction.title = Reply testAction.activationMode = .Background testAction.authenticationRequired = false testAction.destructive = false let category = UIMutableUserNotificationCategory() category.identifier = CATEGORY_ID category.setActions([testAction], forContext: .Default) category.setActions([testAction], forContext: .Minimal) let categories = NSSet(object: category) as! Set<UIUserNotificationCategory> let settings = UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: categories) application.registerUserNotificationSettings(settings) }The line...let settings = UIUserNotificationSe
2
0
448
Nov ’15
Constraining an associated type from an inherited protocol?
Writing constrained versions of existing protocols seems like a basic and useful thing to do, yet I keep running into problems when trying. I'll try to explain what I mean by an example:Let's say we need a protocol that is exactly like GeneratorType except that its Element must be an IntegerType.I might be missing something but I'm guessing that this is the way to express that in Swift:protocol IntegerGeneratorType : GeneratorType { typealias Element: IntegerType }We could make a GeneratorType based protocol with even harder constraints on its Element, eg that it must be Int:protocol IntGeneratorType : GeneratorType { typealias Element = Int }Now, let's add a default implementation of a method called squaredNext to the latter example protocol:extension IntGeneratorType { mutating func squaredNext() -> Int? { guard let someNext = next() else { return nil } return someNext * someNext // Error: Binary operator '*' cannot be applied to two 'Self.Element' operands. } }I can't see the reason for that error. It s
2
0
2.1k
Nov ’15
Apple Watch & iBeacons for motion capture
Hi, I'm wondering if anyone can help me. I'm looking into the feasibility of linking a series of ibeacons at hinge points on the body linked to the apple watch to essnetially provide a motion capture environment for sports coaching. However, as this is all quite a new area, I can't work find enough information on the feasibility of this. I was wondering if those experienced with iBeacons can give me the benefit of their experience on this.I'm looking at two feasibility studies:1, 12 ibeacons would be located at various parts of the body linked to apple watch on wrist and iphone in pocket. Via the custom app, the ibeacon locations could be drawn together in appropriate relationship to form a wireframe skeleton. The app would record 3D video of the sports activity to allow for a new perspective on sports coaching. The nearest thing I've seen to this usage is here: http://techcrunch.com/2013/11/24/notch/2, The second feasibility study would be if the above did not meet feasibility requirements. In this
4
0
1.5k
Nov ’15
Reply to Month/Day/Year Order from Locale?
But I thought the entire point of changing the locale calendar to Gregorian would override the user's region settings for the app…Right. My point was a general one: you shouldn’t assume that there’s a relationship between your app’s localisations and the user’s chosen locale.The only thing my pickers get from the system is the short names of the months, the rest are generated items from 1..31, 1995...2030, etc.I hope you’re not hard-coding those literal strings. There are locales that use the Gregorian calendar but don’t use Western Arabic numerals. There are also locales, like Japanese and Chinese, where each the numeric values of component are always framed by text.You could implement this by running each day and month choice through a date formatter that itself is customised with a format string generated from a template. If you do this I recommend that you double check the results against UIDatePicker to see if they are reasonable.All-in-all this task just keeps getting uglier )-:Share and Enjoy
Nov ’15
Reply to Implementing Data Protection
1. If you don't have the data protection entitlement on for your AppID, does this mean that adding NSDataWritingFileProtectionComplete to your code will not provide any protection?No. The entitlement sets the default value for your container, and hence for anything created within your container. You can always override that default programmatically (via NSDataWritingFileProtectionComplete or any of the other data protection APIs). 2. If you do have the data protection entitlement enabled in your AppID, and you have set that entitlement to Protected Until First User Authentication, is this the default level of protection?Yes, but see below.Can you still choose a higher level of data protection like NSDataWritingFileProtectionComplete for particular files?Yes.Be aware that the definition of default is more subtle than you might think. By default the data protection value is inherited from the parent directory when you create an item. For example, if you have a directory set to NSFileProtectionComplete,
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’15
Illegal attempt to establish a relationship problem.
I pass a object from another viewcontroller and try to add a new record on coredata, object is not nil , but I got the error message below, why? What is that mean in different contexts?'NSInvalidArgumentException', reason: 'Illegal attempt to establish a relationship 'schedule' between objects in different contexts
Replies
3
Boosts
0
Views
7.1k
Activity
Oct ’15
Reply to The app store interface needs a lot of work, it is horrible for app discovery
Apple has baited devs like this before when a new device came around, so it shouldn't come as any surprise that Apple serves Apple in the store once again. Devs are ranked down on the app store foodchain.The sooner you get used to that equation, the sooner you can relax behind the relationship as it exists.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’15
Infomation Needed developer's relationship to my app?
Information NeededWe began the review of your app but aren't able to continue because we need additional information about your app.At your earliest opportunity, please review the following question(s) and provide as much detailed information as you can. The more information you can provide upfront, the sooner we can complete your review.1. What is the developer's relationship to Kim? Please provide detailed information.------------------------------------------------------------------------------------------------------------------------------Kim is our client. He requested me to make this app. (his personal app, He is a celebrity.)Is this infomation above enough? I don't know what kind of detail information apple reviewer want? Thank for your help.
Replies
1
Boosts
0
Views
155
Activity
Oct ’15
Reply to Illegal attempt to establish a relationship problem.
Thanks a lot. You solved my problem.When pass ManagedObject from last viewcontroller , it need to retrive it from managedContext(backgroundContext)let objectID = schedule.objectID let belongSchedule = self.cdh.backgroundContext?.objectWithID(objectID) as! Schedule newDailyPlan.schedule = belongSchedule // schedule is relationship self.cdh.saveContext(self.cdh.backgroundContext!)
Replies
Boosts
Views
Activity
Oct ’15
ld: library not found for -lReactiveCocoa
Here is my problem:I`ve got a project already,today i had it cococPods managed for i want to useReactiveCocoa in my project.After i set up the pod,and build it,this error occured;ld: library not found for -lReactiveCocoaI have checked the Target`s Library Search Paths setting ,it seems allright;$(inherited)So i was confused.I want to konw where did it inhrit with?
Replies
0
Boosts
0
Views
541
Activity
Nov ’15
Feature Request: A way to do a kinda half-way typealias
(This is part of my larger desire for Swift to have explicit code-generation support, since we don't get macros anymore)For instance, say I've defined a Point type:struct Point2D<T: ScalarType> : CustomStringConvertible, Equatable { //Yes, I know there's no such protocol as ScalarType. Hint, hint... nudge, nudge... var x: T var y: T var description: String { return ((x), (y)) } } func == <T: ScalarType> (lhs: Point2D<T>, rhs:Point2D<T>)-> Bool { return lhs.x == rhs.x && lhs.y == rhs.y }and I want a Vector2D type. The easiest way would be a typealias:typealias Vector2D = Point2D<Double>But then when I write the dot product functionfunc * (lhs: Vector2D, rhs: Vector2D) -> Double { return lhs.x * rhs.x + lhs.y * rhs.y }... code likelet v = Vector2D(x: 3.0, y: 1.2) let p = Point2D(x: 1.0, y: 1.3) let foo = v * p... will compile even though, at least semantically speaking, it breaks Swift's type-safety.Obviously, this is a pretty trivial example, but in the general sense
Replies
2
Boosts
0
Views
446
Activity
Nov ’15
Reply to How do we know which CNContainer represents iCloud?
Maybe iCloud inherits the traditional title of AddressBook syncing service since MobileMe (or .Mac?).
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Nov ’15
Problem with Swift 2.1 and UIUserNotificationSettings
I'm new to app development and have inherited a project which I am currently updating to Swift 2.1.I've cleaned up all compile errors except this last one, and need some help. The section of code I'm having problems with is as follows:if application.respondsToSelector(registerUserNotificationSettings:) { let testAction = UIMutableUserNotificationAction() testAction.identifier = TEST_ACTION testAction.title = Reply testAction.activationMode = .Background testAction.authenticationRequired = false testAction.destructive = false let category = UIMutableUserNotificationCategory() category.identifier = CATEGORY_ID category.setActions([testAction], forContext: .Default) category.setActions([testAction], forContext: .Minimal) let categories = NSSet(object: category) as! Set<UIUserNotificationCategory> let settings = UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: categories) application.registerUserNotificationSettings(settings) }The line...let settings = UIUserNotificationSe
Replies
2
Boosts
0
Views
448
Activity
Nov ’15
Does an owner record need to have a CKReference field or just the owned record?
I'm posting this in this forum because it will get more attention here. If I have two record types with a one-to-many relationship does the owner (one) record have to have a CKReference field or just the owned (many) record? If the owner record has a CKReference field, what is that field set to in the owner record?
Replies
0
Boosts
0
Views
231
Activity
Nov ’15
Constraining an associated type from an inherited protocol?
Writing constrained versions of existing protocols seems like a basic and useful thing to do, yet I keep running into problems when trying. I'll try to explain what I mean by an example:Let's say we need a protocol that is exactly like GeneratorType except that its Element must be an IntegerType.I might be missing something but I'm guessing that this is the way to express that in Swift:protocol IntegerGeneratorType : GeneratorType { typealias Element: IntegerType }We could make a GeneratorType based protocol with even harder constraints on its Element, eg that it must be Int:protocol IntGeneratorType : GeneratorType { typealias Element = Int }Now, let's add a default implementation of a method called squaredNext to the latter example protocol:extension IntGeneratorType { mutating func squaredNext() -> Int? { guard let someNext = next() else { return nil } return someNext * someNext // Error: Binary operator '*' cannot be applied to two 'Self.Element' operands. } }I can't see the reason for that error. It s
Replies
2
Boosts
0
Views
2.1k
Activity
Nov ’15
Reply to reference type properties atomic vs nonatomic
I assume the reference types properties in Swift are nonatomic.I just performed a simple test which I think answers my question. I created a new Swift class inherited from NSObject and added a reference type property. In the generated header for Objective-C it shows that property declared as nonatomic.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’15
Reply to Constraining an associated type from an inherited protocol?
Using typealias Foo = Bar in a protocol doesn't constrain an associated type; it merely sets a default for it. Swift doesn't currently have a formal way to restrict existing associated types in inherited protocols.I think we already have requests covering the pieces of this, so no need to file a new one.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’15
Apple Watch & iBeacons for motion capture
Hi, I'm wondering if anyone can help me. I'm looking into the feasibility of linking a series of ibeacons at hinge points on the body linked to the apple watch to essnetially provide a motion capture environment for sports coaching. However, as this is all quite a new area, I can't work find enough information on the feasibility of this. I was wondering if those experienced with iBeacons can give me the benefit of their experience on this.I'm looking at two feasibility studies:1, 12 ibeacons would be located at various parts of the body linked to apple watch on wrist and iphone in pocket. Via the custom app, the ibeacon locations could be drawn together in appropriate relationship to form a wireframe skeleton. The app would record 3D video of the sports activity to allow for a new perspective on sports coaching. The nearest thing I've seen to this usage is here: http://techcrunch.com/2013/11/24/notch/2, The second feasibility study would be if the above did not meet feasibility requirements. In this
Replies
4
Boosts
0
Views
1.5k
Activity
Nov ’15
Reply to Month/Day/Year Order from Locale?
But I thought the entire point of changing the locale calendar to Gregorian would override the user's region settings for the app…Right. My point was a general one: you shouldn’t assume that there’s a relationship between your app’s localisations and the user’s chosen locale.The only thing my pickers get from the system is the short names of the months, the rest are generated items from 1..31, 1995...2030, etc.I hope you’re not hard-coding those literal strings. There are locales that use the Gregorian calendar but don’t use Western Arabic numerals. There are also locales, like Japanese and Chinese, where each the numeric values of component are always framed by text.You could implement this by running each day and month choice through a date formatter that itself is customised with a format string generated from a template. If you do this I recommend that you double check the results against UIDatePicker to see if they are reasonable.All-in-all this task just keeps getting uglier )-:Share and Enjoy
Replies
Boosts
Views
Activity
Nov ’15