Skip to content

Commit

Permalink
try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Yang committed Sep 27, 2023
1 parent ee31bf1 commit 46ac6c5
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@
// Use the raw path solution so that asset path can be returned from unloaded bundles.
// See https://github.com/flutter/engine/pull/46073
NSString* assetsPath = [bundle pathForResource:flutterAssetsPath ofType:nil];
if (assetsPath.length == 0) {
// In app extension, using full relative path (kDefaultAssetPath)
// returns nil when the app bundle is not loaded. Try to use
// the sub folder name, which can successfully return a valid path.
assetsPath = [bundle pathForResource:@"flutter_assets" ofType:nil];
}
// if (assetsPath.length == 0) {
// // In app extension, using full relative path (kDefaultAssetPath)
// // returns nil when the app bundle is not loaded. Try to use
// // the sub folder name, which can successfully return a valid path.
// assetsPath = [bundle pathForResource:@"flutter_assets" ofType:nil];
// }
return assetsPath;
}

0 comments on commit 46ac6c5

Please sign in to comment.