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
KidDynamite
Feb 11, 2005

Hey I inherited a codebase with my new job. No one that worked on it is there and it hasn’t been really touched until I was hires. They used fast lane to handle certs and one of the certs is now expired. How do I get it to fix that? I thought fast lane was supposed to do it automatically. Also should I look into something better than fastlane(if there is)?


Are the Xcode tools ready for prime time? Am I ready for prime time? I have so much to do. At least I’m currently having fun and getting to do whatever I want. :unsmith:

KidDynamite fucked around with this message at 03:27 on Sep 11, 2019

Adbot
ADBOT LOVES YOU

Good Sphere
Jun 16, 2018

I just submitted my app this morning. Hopefully it gets approved **crosses fingers**

It uses Metal. For iPhones that aren't Metal devices, will they still be able to view and download it in the App Store?

Glimm
Jul 27, 2005

Time is only gonna pass you by

KidDynamite posted:

Hey I inherited a codebase with my new job. No one that worked on it is there and it hasn’t been really touched until I was hires. They used fast lane to handle certs and one of the certs is now expired. How do I get it to fix that? I thought fast lane was supposed to do it automatically. Also should I look into something better than fastlane(if there is)?

We use fastlane and match is a lifesaver for our white labeled suite of applications. For a single application with one developer it might not be that useful, though if you're using any CI it's probably a must. What issue specifically are you having? You may want to use `match nuke` to start with a clean slate (this will wipe certs on your Apple account so be sure no one else is relying on those before doing this).

I don't think there is anything better than Fastlane out there. It's unfortunate iOS developers have to rely on Google for those tools. Hopefully first party stuff comes out eventually.

KidDynamite posted:

Are the Xcode tools ready for prime time?

They get better every year

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Fastlane is ok but it’s yet another dependency that everyone on the team has to keep in sync, and when it breaks your build breaks too. If you’re developing and releasing under your own dev team just use automatic signing. If you have a build server somewhere then it’s very easy to use xcodebuild, altool, etc. from a lil build script.

sigh and match are definitely for white label/client services shops. They’re also easy to use from a script without converting everything to Fastlane. Though I found match painful to use when nuke isn’t an option (e.g. you’re not the only ones touching the developer portal), maybe it’s gotten better.

(For my next whine session, I’ll complain about how xcpretty can obscure the actual errors!)

edit: also if you find the need to customize basically anything in your fastfile then welcome to the joys of ruby and obscure parameter syntax

Doc Block
Apr 15, 2003
Fun Shoe

Good Sphere posted:

I just submitted my app this morning. Hopefully it gets approved **crosses fingers**

It uses Metal. For iPhones that aren't Metal devices, will they still be able to view and download it in the App Store?

Every iOS device since the iPhone 5S supports Metal AFAIK.

IIRC iOS hasn’t supported non-Metal devices for a while.

lord funk
Feb 16, 2004

Good Sphere what iOS version are you targeting? If you used Metal Performance Shaders, there are a few devices that don't support them (like the first iPad Air).

Good Sphere
Jun 16, 2018

lord funk posted:

Good Sphere what iOS version are you targeting? If you used Metal Performance Shaders, there are a few devices that don't support them (like the first iPad Air).

12.1, and the devices I have iPhone only selected.


Doc Block posted:

Every iOS device since the iPhone 5S supports Metal AFAIK.

IIRC iOS hasn’t supported non-Metal devices for a while.


Oh yeah that's right 5s too, and earlier devices can't even update to my deployment target of 12.1, so I think I'm good. Earlier phone's won't show up on the app store?

Good Sphere fucked around with this message at 17:10 on Sep 12, 2019

Dirk Pitt
Sep 14, 2007

haha yes, this feels good

Toilet Rascal
I've been working on a new app to play with iOS 13 features, and I have to say, Combine, the Diffable Data Source, and Compositional Collection View Layout all loving own bones. I'm not really big on SwiftUI, but I chalk that up to old age at 32.

I also like CoreData in the cloud and all the modernized demos. Good job Apple guys, hope to see you all again at WWDC.

mrbass21
Feb 1, 2009

pokeyman posted:

Fastlane is ok but it’s yet another dependency that everyone on the team has to keep in sync, and when it breaks your build breaks too. If you’re developing and releasing under your own dev team just use automatic signing. If you have a build server somewhere then it’s very easy to use xcodebuild, altool, etc. from a lil build script.

sigh and match are definitely for white label/client services shops. They’re also easy to use from a script without converting everything to Fastlane. Though I found match painful to use when nuke isn’t an option (e.g. you’re not the only ones touching the developer portal), maybe it’s gotten better.

(For my next whine session, I’ll complain about how xcpretty can obscure the actual errors!)

edit: also if you find the need to customize basically anything in your fastfile then welcome to the joys of ruby and obscure parameter syntax

I second this. My first (self assigned) task at my iOS job (I came from a c/c++ background) was to... the nice word is “improve” our builds/pipeline. I went from knowing nothing about CICD, to I’m the expert on the team.

When I looked around everything said “oh, use fast lane and xcpretty”. I use neither of those. It’s all xcbuild calls with other stuff for a bash script. To me that’s way simpler than having to learn a new tool and pray it doesn’t break.

We do CICD with Jenkins, but I’m experimenting with GitLabs.

One thing I really wish I had was a way to resolve project variables in one shot. I know you can have xcbuild dump them all then process the output for the one you’re looking for, but I wish that I could say “give me the arch list” directly.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

mrbass21 posted:

One thing I really wish I had was a way to resolve project variables in one shot. I know you can have xcbuild dump them all then process the output for the one you’re looking for, but I wish that I could say “give me the arch list” directly.

Amen. Then agvtool can use it instead of exploding when encountering a value that references a build setting.

duck monster
Dec 15, 2004

I just got told the dumbest possible reason to hate swift by a C# dude.

"Swift is basically Javascript meets python, and I hate both those languages, so theres no point me trying it".

One of those assertions that left me too flabergasted to even reply to.

duck monster
Dec 15, 2004

pokeyman posted:

Fastlane is ok but it’s yet another dependency that everyone on the team has to keep in sync, and when it breaks your build breaks too. If you’re developing and releasing under your own dev team just use automatic signing. If you have a build server somewhere then it’s very easy to use xcodebuild, altool, etc. from a lil build script.


Fastlane shits me off. Its so easy to break, and debugging it is like trudging through treacle. I just ended up writing a python script to do all the buildy parts, and our CI drives that just fine. Plus I can't help feeling unnerved by google ingesting crashylitics.

quote:

edit: also if you find the need to customize basically anything in your fastfile then welcome to the joys of ruby and obscure parameter syntax

Mostly with ruby what confuses people are its anonymous function passing

When you see
thing.otherthing |blah| do

end

You could think of it like object.method ({ |blah| do things with blah }) (Which will work fine in ruby btw)

or if it was javascript

object.method (function(blah) { do things with blah })

Ruby lets you do parameters without the brackets , or with them, plus a FEW different ways of doing named parameters.

I like ruby, but its a baffling language at first because it provides so many ways to do the same thing, it all just ends up unreadable over a certain complexity threshold if you have multiple people working on it with different preferences and no styleguide.

duck monster fucked around with this message at 17:44 on Sep 14, 2019

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
There’s all that, plus on top you get fastlane’s baffling bespoke command line parameter syntax. I think it invokes colons but I never remember it.

And :hf: python build script buddy.

Double Punctuation
Dec 30, 2009

Ships were made for sinking;
Whiskey made for drinking;
If we were made of cellophane
We'd all get stinking drunk much faster!

duck monster posted:

I just got told the dumbest possible reason to hate swift by a C# dude.

"Swift is basically Javascript meets python, and I hate both those languages, so theres no point me trying it".

One of those assertions that left me too flabergasted to even reply to.

Node.js claims another victim in the stupidest way possible.

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

duck monster posted:

Fastlane shits me off. Its so easy to break, and debugging it is like trudging through treacle. I just ended up writing a python script to do all the buildy parts, and our CI drives that just fine. Plus I can't help feeling unnerved by google ingesting crashylitics.

The best part about Fastlane is when you see an issue on GitHub where the creators are basically just trying xcodebuild parameters at random until poo poo "works". The iOS tooling community is pretty clowny in general but the fastlane team is really next level.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

pokeyman posted:

There’s all that, plus on top you get fastlane’s baffling bespoke command line parameter syntax. I think it invokes colons but I never remember it.

And :hf: python build script buddy.

fastlane's CLI syntax is pretty normal for ruby things, because like cocoapods it was originally created by people who were primarily ruby devs.

ultramiraculous posted:

The best part about Fastlane is when you see an issue on GitHub where the creators are basically just trying xcodebuild parameters at random until poo poo "works". The iOS tooling community is pretty clowny in general but the fastlane team is really next level.

This is because xcodebuild is an undocumented disaster. Each command gets a one sentence description in the man page and if that doesn't tell you everything you need to know you get to either just try poo poo at random until it works or reverse-engineer the private frameworks that comprise Xcode (or if you're lucky find that someone else did that already and copy what they're doing). You'd hope that by now fastlane would have some people working on it that know how to throw poo poo into Hopper, but I think it's been passed between maintainers a few times now?

brap
Aug 23, 2004

Grimey Drawer

duck monster posted:

I just got told the dumbest possible reason to hate swift by a C# dude.

"Swift is basically Javascript meets python, and I hate both those languages, so theres no point me trying it".

One of those assertions that left me too flabergasted to even reply to.

I adopted Swift 1 and liked it for a few years but then they shipped me breaking changes every year for like 3 years and IMO have done a fairly mediocre job in terms of tooling and diagnostic quality. I feel like a lot of energy is going into enabling forms of type inference that make compilation expensive and tooling difficult. So now I have little enthusiasm about it.

brap
Aug 23, 2004

Grimey Drawer
Say what you will about JavaScript, ECMA does not break the language itself when they come out with new features.

It’s just all the apps are innately broken, ba dum tish

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
There's definitely criticisms you can make about Swift, but "Javascript meets python" is not one of them.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
The nice thing about fastlane is that it’s so widely used that you won’t be the first person encountering whatever weird thing just happened with your build or with provisioning profiles or whatever.

I’m not sure that outweighs the times that fastlane itself breaks and takes down your build, and it has nothing to do with fastlane itself. So I guess if xcodebuild is doing something odd, check the fastlane repo issues?

Doctor w-rw-rw-
Jun 24, 2008

brap posted:

I adopted Swift 1 and liked it for a few years but then they shipped me breaking changes every year for like 3 years and IMO have done a fairly mediocre job in terms of tooling and diagnostic quality. I feel like a lot of energy is going into enabling forms of type inference that make compilation expensive and tooling difficult. So now I have little enthusiasm about it.

Lots of reasons to be critical of Swift:

They should have waited until Swift 5 to call it 0.9 or mayyyyybe 1.0. Technically the ABI is only stable on Darwin, not Linux or Windows

Also, the fact that there have been long-term forks of llvm/clang/lldb is stupid and I'm glad that's being solved, though lldb being lovely is hardly Swift's fault.

With Windows support finally coming around maybe Foundation and swift-corelibs-foundation will diverge less.

Swift is great but the only way in which Swift is not alpha or beta quality is on Apple-specific stuff.

Outside of the devtools team(s) it doesn't appear like Apple gives a poo poo about making Swift good for anybody but themselves or are pushing PR to change that so I see orgs not even considering it where a memory-safe, deterministically-refcounted, OOP language is called for because they call it Apple's language.

They didn't even stick to their own open community process to introduce the Swift 5.1 features.

Acceptance of Swift on TensorFlow seems questionable given all of the above and it seems to exist because Chris Lattner but who knows how long that can last without major traction?

I actually love the language and wish I could use it more, but Apple feels like it's ruining it for internal and external developers except where it works as a good Objective-C replacement.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
LLDB being bad isn't Swift's fault, but if it isn't a very closely associated team then the org structure is weird.

Dirk Pitt
Sep 14, 2007

haha yes, this feels good

Toilet Rascal
I’m a fan of Fastlane. Makes it pretty easy to ‘script’ build. We have a dev build that fires on every merge, an ota build that builds a binary on every pull request to test before merge, a nightly TestFlight build to test in production and a weekly release build. Also handles setting build numbers with agvtool in a major, minor, hotfix manner.

Good Sphere
Jun 16, 2018

My app Hue Cycle for iPhone was released Thursday! A real time camera effects app:

https://apps.apple.com/us/app/hue-cycle/id1412811993



I waited for an update until today to post it here, because it crashed iPhone X and up during the tutorial with the previous version.

I could not have done this without the help I got on this thread. Thank you! I had the special opportunity to develop this at my work during downtime over the past two years. I am an amateur with advanced level programming, and no college degree in computer science, so this was quite a challenge. There were so many confusing holdups during development; mostly to do with image and video orientation that I’ve seemed to have cleared up.

Please try, and let me know of any issues, and enjoy!

Good Sphere fucked around with this message at 16:11 on Sep 15, 2019

Fate Accomplice
Nov 30, 2006




One of the best icons I’ve seen in a long time, congrats on publishing. I’ll check it out.

What resources did you use to get into photo and filter stuff? I’ve never worked with the camera before

Good Sphere
Jun 16, 2018

ketchup vs catsup posted:

One of the best icons I’ve seen in a long time, congrats on publishing. I’ll check it out.

What resources did you use to get into photo and filter stuff? I’ve never worked with the camera before

Thanks! I might want to eventually integrate a camera onto that bike into the icon. Definitely subject to change.

It all started when there was some downtime, and I asked my boss if I could research the Swift language to alter the hue on an image, and export a video animation of it cycling through it. Then I found the easiest way of doing that was with CIFilters. For assembling the video I used AVFoundation. Then I wondered how well CIFilters could be used in real time, so I needed to figure out how to get camera input. My boss kept on making suggestions, and it just went on from there.

The app looks simple, but there are seriously way too many things going on for me to keep track of. It’s a wonder that after archiving, it’s only 12.6 MB in size!

Good Sphere fucked around with this message at 17:19 on Sep 15, 2019

dc3k
Feb 18, 2003

what.
I downloaded it to check it out. No crashing on my X during tutorials, but when I hit back after exporting my image to a GIF, it crashed. The realtime effects are cool. I made this!:


https://i.imgur.com/gLyBq5o.gif

Good Sphere
Jun 16, 2018

dc3k posted:

I downloaded it to check it out. No crashing on my X during tutorials, but when I hit back after exporting my image to a GIF, it crashed. The realtime effects are cool. I made this!:


https://i.imgur.com/gLyBq5o.gif

Wow cool GIF! Try experimenting with the controls each filter has. (Buttons, sliders, XY pads)

Hmm I wonder what that could be caused by. Someone’s iPhone 8 kept doing the same thing with a build I had a long time ago. Does it crash every time you hit back, or just that one time?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Very cool, congrats Good Sphere!

dc3k
Feb 18, 2003

what.

Good Sphere posted:

Wow cool GIF! Try experimenting with the controls each filter has. (Buttons, sliders, XY pads)

Hmm I wonder what that could be caused by. Someone’s iPhone 8 kept doing the same thing with a build I had a long time ago. Does it crash every time you hit back, or just that one time?

I'm able to repro it every time. Tried on a bunch of different filters, both front and back camera, photo and video.

Good Sphere
Jun 16, 2018

dc3k posted:

I'm able to repro it every time. Tried on a bunch of different filters, both front and back camera, photo and video.

I really wonder that could be, because another iPhone X here doesn’t crash when you hit back. Maybe it’s based on user settings. Thank you for catching this. I’ll need to investigate first thing tomorrow.

pokeyman posted:

Very cool, congrats Good Sphere!

Thank you pokeyman!

Good Sphere fucked around with this message at 15:41 on Sep 16, 2019

ultramiraculous
Nov 12, 2003

"No..."
Grimey Drawer

Plorkyeran posted:

This is because xcodebuild is an undocumented disaster. Each command gets a one sentence description in the man page and if that doesn't tell you everything you need to know you get to either just try poo poo at random until it works or reverse-engineer the private frameworks that comprise Xcode (or if you're lucky find that someone else did that already and copy what they're doing). You'd hope that by now fastlane would have some people working on it that know how to throw poo poo into Hopper, but I think it's been passed between maintainers a few times now?

Yeah it's the "not throwing poo poo into Hopper" bit that has really irked me before. I mean it's obviously a bit absurd that you have to reverse engineer starting from something called "Xcode3Core" to figure out how the build tools work, but also finding a Fastlane Github issue where it's just people falling over each other trying out different incantations at random super sucks as well...and then you realize that one of the people in there is Felix and something absurd based on that discussion got merged into the codebase.

Doh004
Apr 22, 2007

Mmmmm Donuts...
Fastlane works pretty well. Been using it for like 5 years now. ¯\_(ツ)_/¯

brap
Aug 23, 2004

Grimey Drawer
So I have an iPhone app that downloads a static file from my web server on startup, and redownloads it once every 24 hours.

But it seems like the app is caching the HTTP response hard, to the point that the data still shows up when I launch in airplane mode. So that makes me feel like any server side configuration (cache-control headers, etc) won’t matter.

I am pretty sure I am not persisting this data in anything more than memory. I have tried clearing Safari browsing data on my phone but it didn’t affect anything. Is there anything I can recommend that my users do short of reinstalling my app?

Doctor w-rw-rw-
Jun 24, 2008
That's pretty vague - can you explain what APIs you're using?

stuffed crust punk
Oct 8, 2004

by LITERALLY AN ADMIN
Try fooling around with this yet?

https://developer.apple.com/documentation/foundation/nsurlrequest/cachepolicy

brap
Aug 23, 2004

Grimey Drawer
My client side code looks basically like this

code:
let task = URLSession.shared.dataTask(
    with: URL(string: "https://mysite.com/myfile.json")!,
    completionHandler: { (data: Data?, response: URLResponse?, error: Error?) -> Void in
        let result = try! JSONSerialization.jsonObject(with: data!)
        print(result) // do whatever actually interesting thing with the data
    })
task.resume()
This is used to initialize a field on-demand, and is only requested when the field isn't populated. So I would expect to need to make this request every time the app launches. I will probably try some of the caching flags you suggested. Thanks.

My guess is that this is the flag I want:

quote:

reloadRevalidatingCacheData
Use cache data if it can be validated by the origin source; otherwise, load from the origin.

brap fucked around with this message at 01:32 on Sep 17, 2019

brap
Aug 23, 2004

Grimey Drawer
The .reloadRevalidatingCacheData flag did exactly what I wanted, but there was a remarkable bit of documentation for the cache flags:

https://developer.apple.com/documentation/foundation/nsurlrequest/cachepolicy/reloadrevalidatingcachedata

quote:

Important

This constant is unimplemented and shouldn’t be used.

This doesn't show up as a warning in your build or in the documentation of the containing enum. So if I had never option+clicked on the usage of the constant I would not have known. It feels like I should not ship the code using this flag, so I will probably just use .reloadIgnoringLocalCacheData instead.

Good Sphere
Jun 16, 2018

Is there a way of preventing your iPhone app showing up in the App Store for iPads? I know it will as an iPhone-size app when launched, but my app does not seem ready for it since it crashes. My app's settings under Deployment Info lists only iPhone for Devices.

Adbot
ADBOT LOVES YOU

Doctor w-rw-rw-
Jun 24, 2008
That would be considered a workaround. Even if you find one, Apple reviewers have called bullshit on things like that before and it might not be approved.

"Because it crashes" isn't a really good reason to not deploy to iPads - I think that making the effort to fix your app for iPads is probably going to be the best use of your time.

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