Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
JavaScript and Node.js aren’t iOS development though.

Adbot
ADBOT LOVES YOU

drainpipe
May 17, 2004

AAHHHHHHH!!!!
Right, which is why I want to do it in react native. I was just wondering if I'd be at a serious hindrance if I just got started with react native without knowing any iOS stuff.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
React Native will teach you basically nothing about iOS development.

Which is totally fine if you just want to make phone do thing! But if "learn iOS development" is explicitly your goal, nope. Put another way, if someone said their iOS development experience was entirely with React Native I would mentally rewrite that to "zero iOS development experience, with a small amount of experience in Futzing With Xcode".

Doh004
Apr 22, 2007

Mmmmm Donuts...

drainpipe posted:

Right, which is why I want to do it in react native. I was just wondering if I'd be at a serious hindrance if I just got started with react native without knowing any iOS stuff.

Does it actually need to be a native application? If not, just write it as a webapp to get better with more modern JS.

Stringent
Dec 22, 2004


image text goes here
So have any of y'all done anything much with Combine yet?

lord funk
Feb 16, 2004

Threw my apps up for beta testing on Testflight. So, I'm only going to receive crash reports for iOS 13 devices? Really? Is there a setting somewhere that lets me get crash reports from earlier versions?

The music community generally doesn't update right away cause everything breaks each year.

edit: Testflight links, if you want to play around:

TC-11 3.3 beta:
https://testflight.apple.com/join/Jtc64bMh

TC-Data 2.2 beta:
https://testflight.apple.com/join/SSnJhhdA

duck monster
Dec 15, 2004

Family Values posted:

Please test your apps on the betas, that's what they're for.

We did to some extent, but some changes to the network stack have left us a little bit perplexed on how to proceed. Our main app listens to changes in Wifi to work out what IoT devices to expect on the local lan. IOS13 breaks the ability to know what wifi your on. Apparently VPN apps can be given special permission for it, but we spent a month trying to find a human to talk to at apple about this ,to no joy.

duck monster
Dec 15, 2004

pokeyman posted:

React Native will teach you basically nothing about iOS development.

Which is totally fine if you just want to make phone do thing! But if "learn iOS development" is explicitly your goal, nope. Put another way, if someone said their iOS development experience was entirely with React Native I would mentally rewrite that to "zero iOS development experience, with a small amount of experience in Futzing With Xcode".

I'd probably add to this that now Swift has actually become stable , its a genuinely pleasant language to work with , and if you use its null boxing properly it'll make you a much more defensive and safe coder. Its a good choice of languages to throw next on the queue (aaaand then throw crystal on the list after to see an example of an even better way of handling nulls, but I digress)

Doctor w-rw-rw-
Jun 24, 2008
Stable on Apple, still stabilizing on !Apple and insufficient internal or external commitment to support it on anything but Apple.

I think it could genuinely replace C++ for a lot of cross platform OOP code, but I really, really want official cross compilation support in Xcode, even if it’s marked as alpha quality.

duck monster
Dec 15, 2004

Doctor w-rw-rw- posted:

Stable on Apple, still stabilizing on !Apple and insufficient internal or external commitment to support it on anything but Apple.

I think it could genuinely replace C++ for a lot of cross platform OOP code, but I really, really want official cross compilation support in Xcode, even if it’s marked as alpha quality.

I'd love to see a good QT/QML binding. Cross platform swift with a solid cross platform declarative UI would own,

Doctor w-rw-rw-
Jun 24, 2008

duck monster posted:

I'd love to see a good QT/QML binding. Cross platform swift with a solid cross platform declarative UI would own.

Exactly. I'm not sure about Qt, but 5.1 has everything you need to make a plausible cross platform Swift+declarative UI API. As long as you have some sort of Canvas2D-like compositing API available, I think it would be super plausible to build.

duck monster
Dec 15, 2004

Doctor w-rw-rw- posted:

Exactly. I'm not sure about Qt, but 5.1 has everything you need to make a plausible cross platform Swift+declarative UI API. As long as you have some sort of Canvas2D-like compositing API available, I think it would be super plausible to build.

QML is fantastic. You have a QML file like
code:
 import QtQuick 2.9  // import from Qt 5.9

 Rectangle {
     id: canvas
     width: 250
     height: 200
     color: "blue"

     Image {
         id: logo
         source: "pics/logo.png"
         anchors.centerIn: parent
         x: canvas.height / 5
     }
 }
Then you reference it from your code in the traditional slots/signals format. Pass objects into tables as delegates and a lot of things that are relatively familior to the IOS way of things. Its pretty easy to put together pretty modern looking UIs.

Of course a port of SwiftUI would be even better, but its probably easy to just wrap a battle tested library like QT. Theres some licensing weirdness around it though.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

duck monster posted:

We did to some extent, but some changes to the network stack have left us a little bit perplexed on how to proceed. Our main app listens to changes in Wifi to work out what IoT devices to expect on the local lan. IOS13 breaks the ability to know what wifi your on. Apparently VPN apps can be given special permission for it, but we spent a month trying to find a human to talk to at apple about this ,to no joy.

Are these in-house enterprise apps?

I know it doesn’t help to say “this is why we can’t have nice things” but various advertising companies, big internet companies, etc abuse those APIs to track users... so this is why we can’t have nice things.

duck monster
Dec 15, 2004

Simulated posted:

Are these in-house enterprise apps?
We build hardware and apps that control them

quote:

I know it doesn’t help to say “this is why we can’t have nice things” but various advertising companies, big internet companies, etc abuse those APIs to track users... so this is why we can’t have nice things.

Dog on Fire
Oct 2, 2004

duck monster posted:

We build hardware and apps that control them

If you can't know anymore which SSID you're connected to, I imagine one possibility now would be to give the user the interface for joining your hardcoded SSIDs inside your app. Maybe the user could just pick your hardware from a list and your app could do the connecting to the necessary SSID. Then after the user has connected to your SSID you'd know which one they'd be connected to. The API for joining specified SSIDs should be this one, but I've never used it.

If you want to know which devices are there in your WiFi network you could use something like Bonjour for finding this out. Maybe something for future features.

lord funk
Feb 16, 2004

Swift 5 deprecated float2, so I'm switching to SIMD2<Float>, but I cannot figure out how to convert this extension:

code:
public extension float2 {
    func aspect() -> float2 {
        return float2(self.x / kViewAspectRatio, self.y)
    }
}
I tried this, but it still things 'x' is a Scalar:

code:
public extension SIMD2 where Scalar : FloatingPoint {
    func aspect() -> SIMD2<Float> {
        return SIMD2<Float>(self.x / kViewAspectRatio, self.y)
    }
}

*Binary operator '/' cannot be applied to operands of type 'Scalar' and 'Float'
(kViewAspectRatio is a Float)

duck monster
Dec 15, 2004

Dog on Fire posted:

If you can't know anymore which SSID you're connected to, I imagine one possibility now would be to give the user the interface for joining your hardcoded SSIDs inside your app. Maybe the user could just pick your hardware from a list and your app could do the connecting to the necessary SSID. Then after the user has connected to your SSID you'd know which one they'd be connected to. The API for joining specified SSIDs should be this one, but I've never used it.

If you want to know which devices are there in your WiFi network you could use something like Bonjour for finding this out. Maybe something for future features.

Yeah we've considered these. Unfortunately most of the good ones are covered with idiotic patents that we're trying to avoid. We are around joining SSIDs but getting the notification of WIFI changes is the problem :/

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

lord funk posted:

Swift 5 deprecated float2, so I'm switching to SIMD2<Float>, but I cannot figure out how to convert this extension:

code:
public extension float2 {
    func aspect() -> float2 {
        return float2(self.x / kViewAspectRatio, self.y)
    }
}
I tried this, but it still things 'x' is a Scalar:

code:
public extension SIMD2 where Scalar : FloatingPoint {
    func aspect() -> SIMD2<Float> {
        return SIMD2<Float>(self.x / kViewAspectRatio, self.y)
    }
}

*Binary operator '/' cannot be applied to operands of type 'Scalar' and 'Float'
(kViewAspectRatio is a Float)

Why would self.x not be a Scalar here? This extension only constrains Scalar to be an arbitrary floating-point type, not specifically Float. You need where Scalar == Float, not where Scalar: FloatingPoint.

rjmccall fucked around with this message at 20:04 on Oct 2, 2019

lord funk
Feb 16, 2004

I tried Scalar : FloatingPoint because I saw it in Swift >> Math >> Vector >> SIMD2, line 1133. I was just fishing. Thanks for the clarification.

idempodunk
May 12, 2001
Toilet Rascal
Any apple insiders know what the deal is with Sign in With Apple's non-support of sending email to relay addresses (@privaterelay.appleid.com) w/3rd party senders (mailgrid, etc)?

There've been a few threads on the Apple dev forums about it where they've acknowledged a problem, like https://forums.developer.apple.com/thread/122270, but they've been frustratingly silent about the status of a fix.

idempodunk fucked around with this message at 04:54 on Oct 3, 2019

Star War Sex Parrot
Oct 2, 2003

Is getrusage useless for tracking disk IO on macOS? I wrote a quick test that hammers a file, check rusage afterwards, and most of my fields are 0. I'm really only interested in ru_inblock and ru_outblock.
code:
ru_utime = {timeval} 
 tv_sec = {__darwin_time_t} 9
 tv_usec = {__darwin_suseconds_t} 654026
ru_stime = {timeval} 
 tv_sec = {__darwin_time_t} 49
 tv_usec = {__darwin_suseconds_t} 564316
ru_maxrss = {long} 19955712
ru_ixrss = {long} 0
ru_idrss = {long} 0
ru_isrss = {long} 0
ru_minflt = {long} 5135
ru_majflt = {long} 2
ru_nswap = {long} 0
ru_inblock = {long} 0
ru_oublock = {long} 0
ru_msgsnd = {long} 0
ru_msgrcv = {long} 0
ru_nsignals = {long} 0
ru_nvcsw = {long} 1921
ru_nivcsw = {long} 176872
I know un-maintained fields are left as 0 on Linux, but these are documented in the man page. Is there a different portable syscall I can use to monitor disk usage for a process (or ideally a thread) on macOS?
edit: Linux gives me disk usage I expect to see:
code:
ru_utime = {timeval} 
 tv_sec = {__time_t} 9
 tv_usec = {__suseconds_t} 192005
ru_stime = {timeval} 
 tv_sec = {__time_t} 20
 tv_usec = {__suseconds_t} 472012
<anonymous union> = {union {...}} 
 ru_maxrss = {long} 210020
 __ru_maxrss_word = {__syscall_slong_t} 210020
<anonymous union> = {union {...}} 
 ru_ixrss = {long} 0
 __ru_ixrss_word = {__syscall_slong_t} 0
<anonymous union> = {union {...}} 
 ru_idrss = {long} 0
 __ru_idrss_word = {__syscall_slong_t} 0
<anonymous union> = {union {...}} 
 ru_isrss = {long} 0
 __ru_isrss_word = {__syscall_slong_t} 0
<anonymous union> = {union {...}} 
 ru_minflt = {long} 3897
 __ru_minflt_word = {__syscall_slong_t} 3897
<anonymous union> = {union {...}} 
 ru_majflt = {long} 12
 __ru_majflt_word = {__syscall_slong_t} 12
<anonymous union> = {union {...}} 
 ru_nswap = {long} 0
 __ru_nswap_word = {__syscall_slong_t} 0
<anonymous union> = {union {...}} 
 ru_inblock = {long} 2296
 __ru_inblock_word = {__syscall_slong_t} 2296
<anonymous union> = {union {...}} 
 ru_oublock = {long} 262144
 __ru_oublock_word = {__syscall_slong_t} 262144
<anonymous union> = {union {...}} 
 ru_msgsnd = {long} 0
 __ru_msgsnd_word = {__syscall_slong_t} 0
<anonymous union> = {union {...}} 
 ru_msgrcv = {long} 0
 __ru_msgrcv_word = {__syscall_slong_t} 0
<anonymous union> = {union {...}} 
 ru_nsignals = {long} 0
 __ru_nsignals_word = {__syscall_slong_t} 0
<anonymous union> = {union {...}} 
 ru_nvcsw = {long} 44
 __ru_nvcsw_word = {__syscall_slong_t} 44
<anonymous union> = {union {...}} 
 ru_nivcsw = {long} 75
 __ru_nivcsw_word = {__syscall_slong_t} 75

Star War Sex Parrot fucked around with this message at 17:42 on Oct 3, 2019

VideoGameVet
May 14, 2005

It is by caffeine alone I set my bike in motion. It is by the juice of Java that pedaling acquires speed, the teeth acquire stains, stains become a warning. It is by caffeine alone I set my bike in motion.
How do I tell XCODE (v11) that I want to have my (already approved) app run on AppleTV? I can't select it as a 'Device'.

Doctor w-rw-rw-
Jun 24, 2008
https://news.ycombinator.com/item?id=21164005, especially

https://lists.apple.com/archives/cocoa-dev/2019/Oct/msg00009.html posted:

We refuse to use Swift, another platform-specific language: the project is very large and we can’t rewrite hundreds of files on a whim. Swift may be nice, but it’s not necessary.

*shouts into megaphone*

Apple, get your poo poo together and market the fact that Swift runs on multiple platforms!

*breathe in*

and get the other companies with the computer nerds on board and confident enough about its prospects on other platforms to support it!

---

One of my projects I worked on for quite some time recently dropped Swift support so I have not been a happy camper lately :(

More generally (as in not my projects), I've seen huge movement towards Rust and C++ instead, and away from Objective-C/Swift. If there were official support for Swift on !Apple platforms, then I think that calculus would have been significantly different.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
I think you really need to think about what’s actually in Apple’s interest in making such arguments, not what’s in your personal or professional interest.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
Like, you keep making arguments that Apple needs to do __ because it would be more cross platform, but most of these arguments would actually give some party outside Apple a lot of power, with only vague arguments about how much Apple would benefit from this arrangement.

Doctor w-rw-rw-
Jun 24, 2008
I'm more approaching this from the angle that I'm angsty that Apple made a good language and continues to employ a lot of people who work on it, but comparing against other languages, it appears uninterested in the language itself as a product beyond supporting its own OS and hardware. I'm distinguishing between engineers and management here.

The benefit is better/safer/faster OOP programs in general, because right now no other language fills a niche of natively-compiled/OOP/memory-safe/deterministically-gc'd.


eschaton posted:

Like, you keep making arguments that Apple needs to do __ because it would be more cross platform, but most of these arguments would actually give some party outside Apple a lot of power, with only vague arguments about how much Apple would benefit from this arrangement.
Not quite, I'm also arguing that Apple should use the work that is already being done and share a commitment to it. Apple is benefiting from that work because ancillary improvements are needed to do it, and the benefit is that a number of people contributing will still have a job enabling them to continue to contribute, instead of switching teams because the mandate changed in part due to circumstances Apple has the power to influence.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Doctor w-rw-rw- posted:

I'm more approaching this from the angle that I'm angsty that Apple made a good language and continues to employ a lot of people who work on it, but comparing against other languages, it appears uninterested in the language itself as a product beyond supporting its own OS and hardware.

I’m telling you that you need to be more specific about why you feel this is important, in a way that actually has concrete benefits for Apple and does not take control of Apple’s platform away from the company.

Are you similarly urging JetBrains and Google to build native Cocoa and Cocoa Touch support for Kotlin?

Doctor w-rw-rw-
Jun 24, 2008
No, because Java runs on WIndows, Linux, and Android already. I'm not talking about the full runtime platform of Cocoa. I'm talking about Swift itself as a language usable on multiple systems.

I still have a policy of not being too specific about my work, but I'll PM you a little bit.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
The OP there does not deserve any benefit of the doubt on whether he’d actually use Swift if it officially supported Windows. He supposedly has a C++ core with UI layers for Windows and (Carbon) macOS. Carbon entered pseudo-deprecation 12 years ago when Apple refused to release it for 64-bit macOS; it was formally deprecated 7 years ago. Even the shorter of those two periods is provably far longer than it took him to write the Carbon UI in the first place. Plenty of applications are coded around a specific UI toolkit, but once an application has been abstracted to support two such radically different toolkits as Win32 and Carbon, it really just shouldn’t be that difficult to port it to a third. So he’s obviously had minimal interest in supporting macOS for the last decade; there is mo chance that he’d be enthusiastically embracing a new language that would make his macOS port central to his development.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
With 32-bit support finally going away in 10.15 there's been a whole bunch of posts declaring that they're dropping support for macOS from people who either never actually supported macOS in the first place or wrote something for macOS 15 years ago and then barely kept it working in the time since. Apparently it's Apple's fault if in 2015 you decided that it was a good idea to target 32-bit macOS for your port.

lord funk
Feb 16, 2004

I'm with Doctor on this one. Seeing wider adoption of Swift would be good for devs and users. I would love to see more projects outside of iOS development that use Swift. It would make a great tinkering language.

Why can't we hope for Apple to do stuff that benefits others, instead of framing it as being 'good for Apple?'

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
I think eschaton was just saying that that's the sort of argument that the Apple executives who could make that happen would find motivating. The Swift team and its management would love to have better support for more platforms, but doing something like (e.g.) finishing the Foundation port to Linux will take actual engineering resources that we can't just conjure from thin air.

Doctor w-rw-rw-
Jun 24, 2008
Not to mention swift corelibs foundation on Windows, which is even harder because of unixy assumptions in Foundation

Dirk Pitt
Sep 14, 2007

haha yes, this feels good

Toilet Rascal

Stringent posted:

So have any of y'all done anything much with Combine yet?

I’ve been using it for an app I’m working on with some of the new API’s and to teach myself some core data. It is pretty nice to not pass closures all over the place. Though I might be doing something wrong with futures because they don’t seem to want to deallocate unless I write a separate function to cancel the subscriber.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
Foundations and even AppKit ran on Windows NT in the mid-late 1990s as OPENSTEP Enterprise, the APIs have always been reasonably abstracted from basic Unixisms.

The implementation in Swift Foundation may not be but if people want to use it on Windows, I’m sure changes from the community to increase its abstraction will be welcomed as long as they don’t interfere with its primary platforms.

duck monster
Dec 15, 2004

eschaton posted:

Foundations and even AppKit ran on Windows NT in the mid-late 1990s as OPENSTEP Enterprise, the APIs have always been reasonably abstracted from basic Unixisms.

The implementation in Swift Foundation may not be but if people want to use it on Windows, I’m sure changes from the community to increase its abstraction will be welcomed as long as they don’t interfere with its primary platforms.

I'm fairly certain a lot of those frameworks *still* exist on windows as support libraries for iTunes etc. Not that I have run an apple product on a windows machine in an exceedingly long time (And the experience was very poorly. It boggled me apple put out such crappy windows software. Its a terrible first experience of apple products for people contemplating switching to a mac)

duck monster
Dec 15, 2004

Also Catalina just dropped. Not that you'd know it from the app store. Its not even on the front page :psyduck:

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
They always do a staggered rollout of new major versions.

mrbass21
Feb 1, 2009
I would love swift to be on Windows. If I had the knowledge to actually provide any sort of effort in helping get swift in Windows, I would love to help.

Unfortunately I’m just not that smart.

Adbot
ADBOT LOVES YOU

Doctor w-rw-rw-
Jun 24, 2008

mrbass21 posted:

I would love swift to be on Windows. If I had the knowledge to actually provide any sort of effort in helping get swift in Windows, I would love to help.

Unfortunately I’m just not that smart.

There might be less to do than you think, maybe ask them how you can help?

https://forums.swift.org/t/windows-nightlies/19174/83
https://dev.azure.com/compnerd/windows-swift/_build?definitionId=1
https://github.com/save-buffer/swift-repl

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply