Skip to content

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Jan 16, 2019

This moves the flutter_assets folder to App.framework. The engine side is already set up to use this correctly, and has been for some time.

  • Updates xcode_backend.sh to write flutter_assets to App.framework folder
  • Removes need to copy that folder when embedding assets for Add2App
  • Changes upgradePbxProjWithFlutterAssets to remove references to flutter_assets and app.flx.
    • Adds test for that method
    • Makes that method more efficient rather than doing multiple iterations of the pbxproj lines. Even if we can't land this patch, we should land a fix for that.
  • Updates pbxproj.tmpl files to remove references to flutter_assets.

This will make our Add2App story take one less step for iOS. It will also improve our ability to support Carthage (we can just vend the frameworks and the assets are included).

Fixes #23839

Helps with #26099

@dnfield dnfield requested review from a14n and xster and removed request for a14n January 16, 2019 07:26
@dnfield dnfield added platform-ios iOS applications specifically a: existing-apps Integration with existing apps via the add-to-app flow t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels. labels Jan 16, 2019
@dnfield dnfield requested review from chinmaygarde and removed request for chinmaygarde January 16, 2019 07:29
@dnfield
Copy link
Contributor Author

dnfield commented Jan 16, 2019

For reviewers - 1215156 is the meat of this change, the second commit is updating all the pbxproj files in our various samples/tests so we don't end up rewriting them every time.

@dnfield
Copy link
Contributor Author

dnfield commented Jan 16, 2019

Helps with #24176

final Match match = oldAssets.firstMatch(line);
if (match != null) {
if (printedStatuses.add(match.group(1)))
printStatus('Removing obsolete reference to ${match.group(1)} from ${project.hostAppBundleName}');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are you removing it? If someone flutter created before, have the flutter_assets 'folder' in pbxproj, what's going to remove it for them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The continue statement on the next line skips adding it to the StringBuffer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think that'd be preferable as an else clause?

@xster
Copy link
Member

xster commented Jan 16, 2019

LGTM

@dnfield dnfield merged commit d8db70a into flutter:master Jan 16, 2019
@dnfield dnfield deleted the flutter_assets_ios branch January 16, 2019 22:03
dnfield added a commit to dnfield/flutter that referenced this pull request Jan 16, 2019
dnfield added a commit that referenced this pull request Jan 17, 2019
kangwang1988 pushed a commit to XianyuTech/flutter that referenced this pull request Feb 12, 2019
* move flutter_assets to App.framework

* remove flutter_assets references from all pbxproj files checked in
kangwang1988 pushed a commit to XianyuTech/flutter that referenced this pull request Feb 12, 2019
mklim pushed a commit to flutter/plugins that referenced this pull request Sep 25, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove ARCHS, which was causing a compilation error
mklim pushed a commit to flutter/plugins that referenced this pull request Sep 25, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove DEVELOPMENT_TEAM references since having those provisioning profiles should not be required to run the examples (most examples don't have one)
7. Looks like this was last run with `use_frameworks!`?  Let CocoaPods build as libraries instead of frameworks.
8. Remove ARCHS, which was causing a compilation error
mklim pushed a commit to flutter/plugins that referenced this pull request Sep 25, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove extraneous framework outputs flutter/flutter#20685
mklim pushed a commit to flutter/plugins that referenced this pull request Sep 25, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove extraneous framework outputs flutter/flutter#20685
mklim pushed a commit to flutter/plugins that referenced this pull request Sep 27, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove ARCHS, which was causing a compilation error
Vallasc pushed a commit to Vallasc/camera_plugin that referenced this pull request Nov 9, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove DEVELOPMENT_TEAM references since having those provisioning profiles should not be required to run the examples (most examples don't have one)
7. Looks like this was last run with `use_frameworks!`?  Let CocoaPods build as libraries instead of frameworks.
8. Remove ARCHS, which was causing a compilation error
mormih pushed a commit to mormih/plugins that referenced this pull request Nov 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove ARCHS, which was causing a compilation error
mormih pushed a commit to mormih/plugins that referenced this pull request Nov 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove DEVELOPMENT_TEAM references since having those provisioning profiles should not be required to run the examples (most examples don't have one)
7. Looks like this was last run with `use_frameworks!`?  Let CocoaPods build as libraries instead of frameworks.
8. Remove ARCHS, which was causing a compilation error
mormih pushed a commit to mormih/plugins that referenced this pull request Nov 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove extraneous framework outputs flutter/flutter#20685
mormih pushed a commit to mormih/plugins that referenced this pull request Nov 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove extraneous framework outputs flutter/flutter#20685
mormih pushed a commit to mormih/plugins that referenced this pull request Nov 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove ARCHS, which was causing a compilation error
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove ARCHS, which was causing a compilation error
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove DEVELOPMENT_TEAM references since having those provisioning profiles should not be required to run the examples (most examples don't have one)
7. Looks like this was last run with `use_frameworks!`?  Let CocoaPods build as libraries instead of frameworks.
8. Remove ARCHS, which was causing a compilation error
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove extraneous framework outputs flutter/flutter#20685
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove extraneous framework outputs flutter/flutter#20685
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
1. Let flutter/flutter#26630 flutter_assets migrator run
2. Run `pod install` so flutter_assets is removed from the asset copy build phase
3. Migrate deprecated "English" to "en" language
4. Allow Xcode to remove extraneous xcconfigs, see flutter/flutter#38724
5. Let Xcode 11 update build settings
6. Remove ARCHS, which was causing a compilation error
@dgurudot
Copy link

dgurudot commented Mar 7, 2020

Causing the following error now and blank screen

Failed to find assets path for "Frameworks/App.framework/flutter_assets"

@dgurudot
Copy link

dgurudot commented Mar 8, 2020

causing following issue ... plz share workaround or way forward

#33121

@dgurudot
Copy link

dgurudot commented Mar 9, 2020

@chinmaygarde ... plz see the issue now.

@dnfield
Copy link
Contributor Author

dnfield commented Mar 9, 2020

@dgurudot - this was merged over a year ago now and is being used successfully for add to app and regular uses. It sounds like you have a new issue. Please follow up on the issue you linked, or if yours is different, file a new one with full steps to reproduce.

@flutter flutter locked as resolved and limited conversation to collaborators Mar 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: existing-apps Integration with existing apps via the add-to-app flow platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flutter_assets should be embedded in App.framework

5 participants