Re: [swift-corelibs-dev] NSObject's performSelector(inBackground:with:) doesn't feel right in Swift 3

2016-08-16 Thread Shawn Erickson via swift-corelibs-dev
Ah yeah didn't notice the others got named that way without the selector
after perform. Yeah it seems like it was simply mismapped. I suggest
filling a radar about ASAP (not in the standard library realm).
On Tue, Aug 16, 2016 at 8:52 AM Philippe Hausler  wrote:

> I would claim that perhaps it should be:
>
> open func perform(inBackground aSelector: Selector, with anArgument: Any?)
>
> That way it matches the completion family of the rest of performing. But
> if that is the case we should take a look at the onMainThread ones as well
> so they look like this perhaps:
>
> open func perform(onMainThread aSelector: Selector, with arg: Any?,
> waitUntilDone wait: Bool, modes array: [String]?)
>
> That way the call sites would look like this:
>
> myObject.perform(inBackground: #selector(doBackgroundStuff), with: nil)
> myObject.perform(onMainThread: #selector(doMainThreadStuff), with: nil)
> myObject.perform(#selector(doDelayedThings), with: nil, afterDelay: 0.7)
> let result = myObject.perform(#selector(doThingsNow), with:
> nil).takeUnretainedValue()
>
> On Aug 16, 2016, at 8:46 AM, Shawn Erickson via swift-corelibs-dev <
> swift-corelibs-dev@swift.org> wrote:
>
> It is following the naming methodology of a sentence like structure
> "performed selector in background  with ". It does read a
> little strange but likely comes from a simple remapping of the existing
> objective-c name for familiarly reasons.
>
> It could be performInBackground(selector:,with:) ... "Perform in
> background  with " but that also reads a little strange.
>
> -Shawn
>
> On Tue, Aug 16, 2016 at 8:40 AM Paul Hudson via swift-corelibs-dev <
> swift-corelibs-dev@swift.org> wrote:
>
>> Hello!
>>
>> I just noticed that performSelectorInBackground(_:withObject:) has
>> been mapped to performSelector(inBackground:with:) in Swift 3. So:
>>
>> performSelector(inBackground: #selector(doStuff), with: nil)
>>
>> This seems confusing to me – the "inBackground" label has little to do
>> with the selector that is attached to it. It's possible this has been
>> through careful API review and if so I apologize. On the other hand,
>> if it's an oversight is there time for it to be looked at again?
>>
>> Thank you!
>>
>>
>> Paul
>> --
>> Free Swift tutorials – hackingwithswift.com
>> ___
>> swift-corelibs-dev mailing list
>> swift-corelibs-dev@swift.org
>> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>>
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>
>
>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] NSObject's performSelector(inBackground:with:) doesn't feel right in Swift 3

2016-08-16 Thread Shawn Erickson via swift-corelibs-dev
It is following the naming methodology of a sentence like structure
"performed selector in background  with ". It does read a
little strange but likely comes from a simple remapping of the existing
objective-c name for familiarly reasons.

It could be performInBackground(selector:,with:) ... "Perform in background
 with " but that also reads a little strange.

-Shawn

On Tue, Aug 16, 2016 at 8:40 AM Paul Hudson via swift-corelibs-dev <
swift-corelibs-dev@swift.org> wrote:

> Hello!
>
> I just noticed that performSelectorInBackground(_:withObject:) has
> been mapped to performSelector(inBackground:with:) in Swift 3. So:
>
> performSelector(inBackground: #selector(doStuff), with: nil)
>
> This seems confusing to me – the "inBackground" label has little to do
> with the selector that is attached to it. It's possible this has been
> through careful API review and if so I apologize. On the other hand,
> if it's an oversight is there time for it to be looked at again?
>
> Thank you!
>
>
> Paul
> --
> Free Swift tutorials – hackingwithswift.com
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev


Re: [swift-corelibs-dev] in-app purchase

2016-08-09 Thread Shawn Erickson via swift-corelibs-dev
This isn't likely a good list for this discussion maybe Swift users but
more likely the Apple developer forums would be better. You say your code
is fully of errors? Do you mean compile errors? If so if you post some
small code samples and errors we could possibly help.

-Shawn
On Mon, Aug 8, 2016 at 10:32 PM developer--- via swift-corelibs-dev <
swift-corelibs-dev@swift.org> wrote:

> PLATFORM AND VERSION
> iOS
> i am using a Macbook Pro running El Capitan (i ran the update today) with the 
> latest version of Xcode. i tried
> to test the practice app on my iPad  (i am updating it to iOS 9.3.2 right now)
>
> DESCRIPTION OF PROBLEM
> i am a student, i have taken all of my programming classes but the school's 
> agreement with Apple does not
> allow them to cover in-app purchases. i have followed the instructions from 
> the book "iOS 9 app development
> essentials" to create a practice app to code & test a built-in in app 
> purchase to unlock built in features. my
> purchaseViewController is FULL of errors.  i have no idea how to fix
> the errors. i have built an app that needs to include several in app 
> purchases, but i desperately need help with
> this and my instructor has never created an in app purchase so she doesn't 
> know how to help me. i would
> very much appreciate being able to send my test app to the support team so 
> that a technician could comment
> out the bad code, and add the correct code so that i can see where i went 
> wrong, and hopefully get instruction
> on how to create several in app purchases for the app i wish to get into the 
> app store.
>
>
> this is the response I got from Apple-
>
> Thank you for contacting Apple Developer Technical Support (DTS). Our
> engineers have reviewed your request and have concluded that there is no
> supported way to achieve the desired functionality given the currently
> shipping system configurations.
>
> If you would like for Apple to consider providing an iAP sample in Swift
> in the future, please submit an enhancement request via the Bug Reporter
> tool at .
>
> While a Technical Support Incident (TSI) was initially debited from your
> Apple Developer Program account for this request, we have assigned a
> replacement incident back to your account.
>
> Thank you for taking the time to file this report. We truly appreciate
> your help in discovering and isolating issues.
>
> Im posting this here because I wonder how many other people have
> experienced the same problem and how they’ve overcome it. I really feel
> ripped off. I chose to learn to develop for iOS for particular reasons, and
> now at the end of school, I’m about to graduate without having been taught
> an obviously vital skill that a developer should absolutely posses. I’ve
> looked for help in the developer forums to no avail…I’ve TRIED to make
> sense of what documentation I could find provided by Apple to no avail.  Ya
> see, my class had barely begun to touch Objective-C when Swift was
> officially released out of beta. The class immediately jumped to Swift. I
> have found a few online courses that say they teach what I need to know but
> I just don’t have confidence in these classes. Must I learn Objective-C to
> accomplish this?? Or does anyone here have any feasible solution to offer
> as advice?? If I had known that this precious skill would not be taught to
> me at this school, I would have sought alternatives. A rep at Apple told me
> that she knew of ONE school that was definitely teaching this material…of
> course it is out of my state and I cannot afford to go there, not even for
> 1 class to learn what I seek. I am in Texas.
> Thanks in advance for any help :)
>
>
>
> ___
> swift-corelibs-dev mailing list
> swift-corelibs-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
>
___
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev