File tree Expand file tree Collapse file tree 4 files changed +15
-22
lines changed
Expand file tree Collapse file tree 4 files changed +15
-22
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri-cli " : patch:feat
3+ " @tauri-apps/cli " : patch:feat
4+ ---
5+
6+ Generate empty entitlements file for the iOS project.
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ use crate::Settings;
3131
3232use anyhow:: Context ;
3333use log:: { info, warn} ;
34- use tauri_utils:: config:: BundleTypeRole ;
3534
3635use std:: {
3736 fs,
Original file line number Diff line number Diff line change @@ -164,28 +164,13 @@ pub fn gen(
164164 )
165165 . with_context ( || "failed to process template" ) ?;
166166
167- let asset_dir = dest. join ( DEFAULT_ASSET_DIR ) ;
168- if !asset_dir. is_dir ( ) {
169- create_dir_all ( & asset_dir) . map_err ( |cause| {
170- anyhow:: anyhow!(
171- "failed to create asset dir {path}: {cause}" ,
172- path = asset_dir. display( )
173- )
174- } ) ?;
175- }
176-
177- let externals_dir = dest. join ( "Externals" ) ;
178- if !externals_dir. is_dir ( ) {
179- create_dir_all ( & externals_dir) . map_err ( |cause| {
180- anyhow:: anyhow!(
181- "failed to create Externals dir {path}: {cause}" ,
182- path = externals_dir. display( )
183- )
184- } ) ?;
185- }
167+ let mut dirs_to_create = asset_catalogs. to_vec ( ) ;
168+ dirs_to_create. push ( dest. join ( DEFAULT_ASSET_DIR ) ) ;
169+ dirs_to_create. push ( dest. join ( "Externals" ) ) ;
170+ dirs_to_create. push ( dest. join ( format ! ( "{}_iOS" , config. app( ) . name( ) ) ) ) ;
186171
187- // Create all asset catalog directories if they don't already exist
188- for dir in asset_catalogs {
172+ // Create all required project directories if they don't already exist
173+ for dir in & dirs_to_create {
189174 std:: fs:: create_dir_all ( dir) . map_err ( |cause| {
190175 anyhow:: anyhow!(
191176 "failed to create directory at {path}: {cause}" ,
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ targets:
3232 - path : Sources
3333 - path : Assets.xcassets
3434 - path : Externals
35+ - path : {{app.name}}_iOS
3536 - path : {{app.asset-dir}}
3637 buildPhase : resources
3738 type : folder
@@ -58,6 +59,8 @@ targets:
5859 CFBundleVersion : {{apple.bundle-version}}
5960 {{~#each apple.plist-pairs}}
6061 {{this.key}}: {{this.value}}{{/each}}
62+ entitlements :
63+ path : {{app.name}}_iOS/{{app.name}}_iOS.entitlements
6164 scheme :
6265 environmentVariables :
6366 RUST_BACKTRACE : full
You can’t perform that action at this time.
0 commit comments