layoutSubviews,
@layoutSubviews@mastodon.social avatar

In Xcode 15.4, SPM now auto-generates Swift symbols for catalog assets.
That's great! Except they're declared internal, therefore they're useless in a package whose sole purpose is defining a Design System 😕

rhysmorgan,
@rhysmorgan@mastodon.social avatar

@layoutSubviews Arghhh. I don’t get why there’s no setting in the Package.swift to say which access modifier you want to use for generated symbols.

danielsaidi,
@danielsaidi@mastodon.social avatar

@layoutSubviews @tonyarnold But the package manifest could have a way to declare the scope of certain resources. That would be very nice for the design system use case.

danielsaidi,
@danielsaidi@mastodon.social avatar

@layoutSubviews @tonyarnold I actually think it’s a good decision, much like making all other types internal and leaving it up to the package author to define scope. I don’t think it would be a good idea to openly expose all assets, since there may be considerations to what you want to expose, how an asset is meant to be used, etc. I use to create public, static image extension properties for the assets I expose from a package. It also lets you redesign how an asset is resolved at a later time.

NeoNacho,

@layoutSubviews @tonyarnold I’d say that’s a feature, your API shouldn’t be autogenerated

layoutSubviews,
@layoutSubviews@mastodon.social avatar

@NeoNacho @tonyarnold if it’s an internal package and I’m the sole consumer of it, I don’t care if it breaks. That’s actually the whole point.

harshil,
@harshil@mastodon.social avatar

@layoutSubviews It really does feel like half the company doesn’t know SPM exists

layoutSubviews,
@layoutSubviews@mastodon.social avatar

@harshil the way software is built/linked inside Apple is totally different from what 3rd party devs use. No surprise nobody notices these glaring omissions.

tonyarnold,
@tonyarnold@mastodon.social avatar

@layoutSubviews @harshil that sounds like a solvable problem that excellent executive leadership would be interested in fixing.

layoutSubviews,
@layoutSubviews@mastodon.social avatar

@tonyarnold @harshil nah mate, gotta put AI in the Calculator first.

manuel_carlos_,
@manuel_carlos_@mastodon.social avatar

@layoutSubviews uh, tell us more

david,
@david@tnku.co avatar

@layoutSubviews @harshil I honestly would love an in depth look at how most teams at Apple handle dependencies.

layoutSubviews,
@layoutSubviews@mastodon.social avatar

@david @harshil the thing is, they don’t. Everything is delivered in a giant nightly SDK you install first thing in the morning while sipping a cup of coffee.
If you really need to use something another team just made that day, you install a “root” which is just a tarball overwriting the relevant files in the SDK.
Gross? Yeah. Does it matter? No, tomorrow morning you wipe it all off and install a fresh SDK anyway.

calicoding,
@calicoding@mastodon.social avatar

@layoutSubviews I think I filed a FB on this during WWDC last year. Without configurable access control this feature is kind of a joke

ryanbooker,
@ryanbooker@mastodon.social avatar

@layoutSubviews For me, they don't seem to generate at all in packages?

layoutSubviews,
@layoutSubviews@mastodon.social avatar

@ryanbooker Don't you have a GeneratedAssetSymbols.swift file generated in DerivedSources/ ?

ryanbooker,
@ryanbooker@mastodon.social avatar

@layoutSubviews Ah I see. ColorResource vs Color? In the app's Asset catalog I see them generated under Color directly. That doesn't seem to happen in Packages.

I now see what you mean re ColorResource. :(

ryanbooker,
@ryanbooker@mastodon.social avatar
bgannin,
@bgannin@mastodon.social avatar

@layoutSubviews You had one job asset catalog and SPM!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • khanakhh
  • magazineikmin
  • osvaldo12
  • cubers
  • mdbf
  • Youngstown
  • tacticalgear
  • slotface
  • rosin
  • kavyap
  • ethstaker
  • everett
  • thenastyranch
  • DreamBathrooms
  • megavids
  • InstantRegret
  • normalnudes
  • GTA5RPClips
  • tester
  • ngwrru68w68
  • cisconetworking
  • modclub
  • Durango
  • Leos
  • provamag3
  • anitta
  • JUstTest
  • lostlight
  • All magazines