Re: Times in other cities
Apple has a good Technical Q&A about this: https://developer.apple.com/library/content/qa/qa1480/_index.html Sal > You might want to err on the side of caution and ensure that the Calendar object is explicitly set > to Gregorian rather than using the current system setting. > Jonathan > On 15 May 2017, at 13:50, Eric E. Dolecki wrote: > > Thanks for your reply. Does this look safe to use? > > // London > let locale = TimeZone.init(abbreviation: "BST") > let cal = Calendar.current > let date = Date() > let comp = cal.dateComponents(in:locale!, from: date) > > // Local (right now for me it's Boston) > let hour = Calendar.current.component(.hour, from: date) > > print("HOUR OFFSET: \(comp.hour! - hour)") //HOUR OFFSET: 5 > > It's okay if the modifier is negative (Los Angeles from Boston, etc.) > > > > > > > On Sun, May 14, 2017 at 9:29 PM Jens Alfke wrote: > >> >>> On May 14, 2017, at 5:47 PM, Eric Dolecki wrote: >>> >>> I have a clock. If like to present the times in a few major cities. Say >> London, England. Based on the user's current time zone, present the correct >> hour, min, and second for London. If I can see how to do it for one city, I >> should be good for others. >> >> Get an NSTimeZone instance based on a GMT offset or a name >> Create an NSDateFormatter and set its timeZone property. >> Use the formatter to convert [NSDate date] to a string. >> >> If you want to display the time in some other way, like an analog clock, >> use NSDateComponents instead of NSDateFormatter; then you can get the >> hours, minutes and seconds. >> >> —Jens > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/lists%40mugginsoft.com > > This email sent to li...@mugginsoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: initWithRequest:delegate:startImmediately
Disabling ATS isn't a long-term solution. Soon Apple (Jan 1?) will require you to ask for an exemption if your app disables ATS. Check out the WWDC videos on what's new in app security. In a nutshell you need to specify (in the imno.plist) the specific domains that you want to turn off ATS. Sal -- Sal Conigliaro, e design www.erinedesign.com @sconig > On Oct 24, 2016, at 3:00 PM, cocoa-dev-requ...@lists.apple.com wrote: > > Date: Mon, 24 Oct 2016 11:36:47 -0600 > From: "Raglan T. Tiger" > To: Cocoa Dev > Subject: Re: initWithRequest:delegate:startImmediately > Message-ID: <605b986e-c562-4f50-bbc7-fab34865e...@crusaderrabbit.net> > Content-Type: text/plain;charset=us-ascii > > Holy connection batman ... just put > > > > NSAppTransportSecurity > >NSAllowsArbitraryLoads > > > > > > in the info.plst. > > Sorry for the noise ... but it is Monday morning. > > -rags ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Emailing from a daemon process
You can send mail using sendmail without having to configure Postfix or Sendmail. Out of the box OS X can use sendmail to send messages. You can test it by doing: echo “Subject: Email from OX“ | /usr/sbin/sendmail recipi...@domain.com (You’ll have to actually include more email headers so it has less chance of being marked as spam) Sal Depending on your customers and product, sending these to your server and > saving them there could be a support feature allowing you or the user to > log in and review them when needed. Even if you don't, almost every web > server is set up with sendmail such that you could utilize it instead. > -- > Gary L. Wade (Sent from my iPhone) > http://www.garywade.com/ > On Jul 7, 2016, at 11:01 AM, Carl Hoefs > wrote: > >> The manufacturers are probably running their own SMTP servers, and the > devices either talk to those directly, or (more likely) send HTTP requests > to the manufacturer’s web server, which then formats the email and sends it > to the SMTP server. > > > > Yes, this seems to be correct. I just checked such emails and I see the > manufacturers usually exploit gmail for this purpose (and I have no gmail > account). -- Sal Conigliaro, e design http://www.erinedesign.com @sconig ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
[OT] We also appeared in Product Hunt
We also made it onto Product Hunt! http://www.producthunt.com/tech/fresh-air-2 It's an app for the Watch and iPhone that provides real-time air quality info from the U.S. EPA -- Sal Conigliaro, e design http://www.erinedesign.com @sconig ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
App extension killed by system (memory limit?)
Does anyone know what iOS 8 gives app extensions before it kills them? From what I can gather from the crash log, the extension gets about 12K pages before the system kills it with the 'per-process-limit' reason (if it's due to memory, it looks like it allocates about 50MB): Processes Name || CPU Time| rpages| purgeable| recent_max| lifetime_max| fds | [reason] | (state) TestKeyboard <8dd580efc6173c828650fe6119da1198>10.228 124810 - 14626 50 [per-process-limit] (frontmost) -- Sal Conigliaro, e design http://www.erinedesign.com @sconig ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Resolve alternative TLD
Let me clarify: The 'start.rentals' domain is *not* a valid domain. The root servers for .rentals have no info on it: > set q=ns > rentals Server: 192.168.123.1 Address: 192.168.123.1#53 Non-authoritative answer: rentals nameserver = demand.beta.aridns.net.au. rentals nameserver = demand.alpha.aridns.net.au. rentals nameserver = demand.gamma.aridns.net.au. rentals name server = demand.delta.aridns.net.au. > set q=a > start.rentals Server: 192.168.123.1 Address: 192.168.123.1#53 ** server can't find start.rentals: NXDOMAIN > server demand.beta.aridns.net.au Default server: demand.beta.aridns.net.au Address: 37.209.194.7#53 > start.rentals. Server: demand.beta.aridns.net.au Address: 37.209.194.7#53 ** server can't find start.rentals.: NXDOMAIN For valid 'vanity' TLDs, you must prefix it with 'http:' in order for Safari to resolve it; otherwise it simply performs a search on that term. Whoever registered 'start.rentals' needs to follow up with their registrar. Sal On Fri, Jul 4, 2014 at 3:56 PM, Sal Conigliaro wrote: > If you prefix it with 'http:', then the browser can resolve the name. > > Sal > > -- > Sal Conigliaro, > e design > http://www.erinedesign.com > @sconig > > On Fri, Jul 4, 2014 at 3:00 PM, wrote: > >> >> Date: Thu, 03 Jul 2014 22:33:21 +0200 >> From: Diederik Meijer | Ten Horses >> To: Alex Zavatone >> Cc: "cocoa-dev@lists.apple.com Developers" >> Subject: Re: Resolve alternative TLD >> Message-ID: >> Content-Type: text/plain; charset=windows-1252 >> >> This is what it looks like in the Sundial browser: >> http://www.tenhorses.com/sundial.png >> >> So I guess I somehow need to handle DNS Lookup / IP resolving myself, is >> there anybody here who has any idea how to proceed? >> >> Thanks! >> >> >> >> >> >> Op Jul 3, 2014, om 7:31 PM heeft Alex Zavatone het >> volgende geschreven: >> >> > Firefox doesn't resolve start.rental either. >> > Neither does Chrome. >> > >> > On Jul 3, 2014, at 12:58 PM, Diederik Meijer | Ten Horses wrote: >> > >> >> Take start.rental as an example, has a live server on the dot rental >> TLD, but no standard browser will resolve it, try it in Safari, you'll see.. >> >> >> >> Verstuurd vanaf mijn iPhone >> >> >> >>> Op 3 jul. 2014 om 18:22 heeft Jens Alfke het >> volgende geschreven: >> >>> >> >>> >> >>>> On Jul 3, 2014, at 6:52 AM, Diederik Meijer | Ten Horses < >> diede...@tenhorses.com> wrote: >> >>>> >> >>>> The issue being that the TLD (think for example: domain.law, with >> law being the TLD) is accessible through a DNS server, but since the TLD is >> not officially registered with ICANN, standard browsers do not resolve the >> domain into an IP address. Using a standard UIWebView does not work. But, I >> repeat, the server is up and running and the domain is accessible through >> the network. >> >>> >> >>> Really? I’m not aware of anything built into browsers that restricts >> them to a fixed set of “official” TLDs. As far as I know, the client simply >> hands off _any_ hostname for DNS lookup, which will query the configured >> DNS server(s). >> >>> >> >>> Are you 100% sure that the DNS is configured correctly? For example, >> the name server (or some parent of it) needs to have a custom entry for >> “.law”, otherwise it will end up querying upstream for it, and the upstream >> (ISP) name servers won’t know about that TLD. >> >>> >> >>> Also, are you 100% sure that the iOS device is configured to access >> the DNS server that knows about your custom domain? It’s probably getting >> the name server IP addresses via DHCP. >> >>> >> >>> —Jens >> >>> >> >>> PS: This question really belongs on the macnetworkprog mailing list. >> There are Apple networking gurus hanging out there who don’t monitor >> cocoa-dev. >> >> ___ >> >> >> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) >> >> >> >> Please do not post admin requests or moderator comments to the list. >> >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com >> >> >> >> Help/Unsubscribe/Update your Subscription: >> >> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com >> >> >> >> This email sent to z...@mac.com >> > >> > >> >> > > -- Sal Conigliaro, e design http://www.erinedesign.com @sconig ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Resolve alternative TLD
If you prefix it with 'http:', then the browser can resolve the name. Sal -- Sal Conigliaro, e design http://www.erinedesign.com @sconig On Fri, Jul 4, 2014 at 3:00 PM, wrote: > > Date: Thu, 03 Jul 2014 22:33:21 +0200 > From: Diederik Meijer | Ten Horses > To: Alex Zavatone > Cc: "cocoa-dev@lists.apple.com Developers" > Subject: Re: Resolve alternative TLD > Message-ID: > Content-Type: text/plain; charset=windows-1252 > > This is what it looks like in the Sundial browser: > http://www.tenhorses.com/sundial.png > > So I guess I somehow need to handle DNS Lookup / IP resolving myself, is > there anybody here who has any idea how to proceed? > > Thanks! > > > > > > Op Jul 3, 2014, om 7:31 PM heeft Alex Zavatone het volgende > geschreven: > > > Firefox doesn't resolve start.rental either. > > Neither does Chrome. > > > > On Jul 3, 2014, at 12:58 PM, Diederik Meijer | Ten Horses wrote: > > > >> Take start.rental as an example, has a live server on the dot rental > TLD, but no standard browser will resolve it, try it in Safari, you'll see.. > >> > >> Verstuurd vanaf mijn iPhone > >> > >>> Op 3 jul. 2014 om 18:22 heeft Jens Alfke het > volgende geschreven: > >>> > >>> > >>>> On Jul 3, 2014, at 6:52 AM, Diederik Meijer | Ten Horses < > diede...@tenhorses.com> wrote: > >>>> > >>>> The issue being that the TLD (think for example: domain.law, with law > being the TLD) is accessible through a DNS server, but since the TLD is not > officially registered with ICANN, standard browsers do not resolve the > domain into an IP address. Using a standard UIWebView does not work. But, I > repeat, the server is up and running and the domain is accessible through > the network. > >>> > >>> Really? I’m not aware of anything built into browsers that restricts > them to a fixed set of “official” TLDs. As far as I know, the client simply > hands off _any_ hostname for DNS lookup, which will query the configured > DNS server(s). > >>> > >>> Are you 100% sure that the DNS is configured correctly? For example, > the name server (or some parent of it) needs to have a custom entry for > “.law”, otherwise it will end up querying upstream for it, and the upstream > (ISP) name servers won’t know about that TLD. > >>> > >>> Also, are you 100% sure that the iOS device is configured to access > the DNS server that knows about your custom domain? It’s probably getting > the name server IP addresses via DHCP. > >>> > >>> —Jens > >>> > >>> PS: This question really belongs on the macnetworkprog mailing list. > There are Apple networking gurus hanging out there who don’t monitor > cocoa-dev. > >> ___ > >> > >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > >> > >> Please do not post admin requests or moderator comments to the list. > >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com > >> > >> Help/Unsubscribe/Update your Subscription: > >> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com > >> > >> This email sent to z...@mac.com > > > > > > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 10, Issue 602
You can also use a Safari extension I wrote to search Apple's site directly: http://www.erinedesign.com/extensions/ > > You can use Google to search Apple's dev site... > site:https://developer.apple.com iTunes > > > You can also use it to search the archive for this list... > site:http://lists.apple.com/archives/cocoa-dev iTunes > > > Jeff > > > >> Found it now, thanks. It's ok I am an Apple Mac and iOS Developer. The Apple > Developer site Search Engine sucks - I did a lot of different searches for > iTunes 11.1 and it found zilch!! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com