Skip to content

Commit

Permalink
Solara
Browse files Browse the repository at this point in the history
  • Loading branch information
ideyaa committed Sep 22, 2024
1 parent f2f75a5 commit 6530f37
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
4 changes: 2 additions & 2 deletions solara/lib/core/scripts/brand_resources_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ def initialize(brand_key)
def switch
Solara.logger.log_step("Switch iOS resources") do
add_to_asset_catalog
copy_directories(FilePath.ios_brand_assets(@brand_key), FilePath.ios_project_assets_artifacts)
copy_directories(FilePath.ios_brand_xcassets(@brand_key), FilePath.ios_project_assets_artifacts)
end
end

private

def add_to_asset_catalog
source = FilePath.ios_brand_assets(@brand_key)
source = FilePath.ios_brand_xcassets(@brand_key)
destination = FilePath.ios_project_assets_artifacts
asset_manager = XcodeAssetManager.new(destination)
asset_manager.add(source)
Expand Down
7 changes: 6 additions & 1 deletion solara/lib/core/scripts/file_path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def self.launcher_icon(brand_key)
end

def self.ios_brand_app_icon(brand_key)
File.join(brands, brand_key, ios, 'assets', 'AppIcon.appiconset')
File.join(ios_brand_xcassets(brand_key), 'AppIcon.appiconset')
end

def self.ios_brand_app_icon_image(brand_key)
Expand Down Expand Up @@ -379,6 +379,11 @@ def self.xcode_project
File.join(project_root, path)
end

def self.ios_brand_xcassets(brand_key)
File.join(brands, brand_key, ios, 'xcassets')
end


def self.ios_brand_assets(brand_key)
File.join(brands, brand_key, ios, 'assets')
end
Expand Down
5 changes: 5 additions & 0 deletions solara/lib/core/template/config/android_template_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"target": "android/android_signing.json",
"condition": "true"
},
{
"source": "ios/xcassets/",
"target": "ios/xcassets/",
"condition": "true"
},
{
"source": "ios/assets/",
"target": "ios/assets/",
Expand Down
5 changes: 5 additions & 0 deletions solara/lib/core/template/config/flutter_template_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"target": "android/android_signing.json",
"condition": "true"
},
{
"source": "ios/xcassets/",
"target": "ios/xcassets/",
"condition": "true"
},
{
"source": "ios/assets/",
"target": "ios/assets/",
Expand Down
5 changes: 5 additions & 0 deletions solara/lib/core/template/config/ios_template_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"target": "android/android_signing.json",
"condition": "true"
},
{
"source": "ios/xcassets/",
"target": "ios/xcassets/",
"condition": "true"
},
{
"source": "ios/assets/",
"target": "ios/assets/",
Expand Down

0 comments on commit 6530f37

Please sign in to comment.