Share Xcode assets catalog between projects
Asked Answered
H

1

6

In their documentation apple states that -

You can share asset catalogs across multiple projects in the same workspace.

I have a project in a workspace with multiple targets and an other project in the same workspace that I want to use to share it's catalog with all the targets of his neighbour project.

SharedProject(Framework)

--AssetsCatalog

MainProject

--Target1

--Target2

--etc

Any one has managed to do so and help ?

Hamid answered 26/7, 2015 at 13:43 Comment(0)
L
4

I had the same problem.

I have a workspace with different projects.

My solution:

  1. Open your workspace in Xcode
  2. Add a new asset catalog to your workspace "newSharedAssets.xcasstes"
  3. Now go to projectA and add asset catalog by using right-click "Add Files to projectA" (only add as reference)
  4. Now go to projectB and add asset catalog by using right-click "Add Files to projectB" (only add as reference)

Does it help you?

Logical answered 21/10, 2015 at 14:38 Comment(1)
When archiving the app, it makes a copy of the whole catalog into each module/framework that has it's reference, increasing the app size.Practicable

© 2022 - 2024 — McMap. All rights reserved.