Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[camera] Update and migrate iOS example project #2090

Merged
merged 3 commits into from
Sep 25, 2019

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Sep 25, 2019

Description

  1. Let Move flutter_assets to App.framework 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 Remove xcconfigs from template Copy Bundle Resources build phases 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

Related Issues

Get to a buildable baseline so I can start working on flutter/flutter#41007.

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the [Flutter Style Guide].
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the [CLA].
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@jmagman
Copy link
Member Author

jmagman commented Sep 25, 2019

Does a change to the example app require a build suffix version bump?

Copy link
Contributor

@mklim mklim left a comment

Choose a reason for hiding this comment

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

LGTM pending one nit on the versioning bump and a test exemption.

Lately we've re-emphasized that all PRs need tests, following the Flutter style guide. This PR is already being effectively tested by our existing infra because it's a change to the example app's iOS config, and our infra make sure that the example app still builds on iOS. I don't think there's a meaningful test to be added here on top of what we already have. @Hixie can we get an exemption for this one and the other build refactoring patches @jmagman is landing?

@@ -1,3 +1,7 @@
## 0.5.5
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: This should be 0.5.4+3. Pub changes it's semver scheme for when the plugin is above or below 1.0.0. When it's above 1.0.0 it's major.minor.patch but when it's below it's 0.major.minor+patch.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the catch, sorry about that!

@jmagman
Copy link
Member Author

jmagman commented Sep 25, 2019

@Hixie can we get an exemption for this one and the other build refactoring patches @jmagman is landing?

These changes get us to a baseline where the iOS example apps are migrated and build, so I can start more easily adding tests without including all these diff lines in a PR for every plugin, mostly to make those future reviews smaller and more focused.

@mklim
Copy link
Contributor

mklim commented Sep 25, 2019

@Hixie can we get an exemption for this one and the other build refactoring patches @jmagman is landing?

I talked with @Hixie offline. The DEVELOPMENT_TEAM removal is something that we could/should test for here. We should add something to our CI that greps our examples and makes sure that it's an empty string.

I still think we can't land that exactly in this PR because other plugins are failing so CI would go red. But @jmagman either you or I can land it as a followup to these fixes to prevent this from regressing. I can add it in myself once these are landed.

@jmagman
Copy link
Member Author

jmagman commented Sep 25, 2019

I talked with @Hixie offline. The DEVELOPMENT_TEAM removal is something that we could/should test for here. We should add something to our CI that greps our examples and makes sure that it's an empty string.

Better yet, it shouldn't be present at all. Let me fix that in this change.

@mklim mklim added the submit queue The Flutter team is in the process of landing this PR. label Sep 25, 2019
@mklim mklim self-assigned this Sep 25, 2019
@jmagman
Copy link
Member Author

jmagman commented Sep 25, 2019

our infra make sure that the example app still builds on iOS.

I don't see how anything could be testing this builds. Here's what it looks like on master:

$ cd packages/camera/example/ios 
$ xcodebuild CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=- EXPANDED_CODE_SIGN_IDENTITY=- -workspace Runner.xcworkspace -scheme Runner -configuration Debug
...

** BUILD FAILED **


The following build commands failed:
	CpResource /Users/m/Projects/plugins/packages/camera/example/ios/Flutter/flutter_assets /Users/m/Library/Developer/Xcode/DerivedData/Runner-awfyzlddjninmfeqadavdewbrcar/Build/Products/Debug-iphoneos/Runner.app/flutter_assets
(1 failure)

@mklim
Copy link
Contributor

mklim commented Sep 25, 2019

our infra make sure that the example app still builds on iOS.

I don't see how anything could be testing this builds. Here's what it looks like on master:

The Cirrus task is here: https://github.com/flutter/plugins/blob/master/.cirrus.yml#L76-L78. That goes through a couple layers, but it ends up running flutter build ios --no-codesign https://github.com/flutter/plugin_tools/blob/194fcac6a8e4da55153b35765a4de59c9148d061/lib/src/build_examples_command.dart#L40-L48. I think the --no-codesign is probably why it's green in CI.

@jmagman
Copy link
Member Author

jmagman commented Sep 25, 2019

our infra make sure that the example app still builds on iOS.

I don't see how anything could be testing this builds. Here's what it looks like on master:

The Cirrus task is here: https://github.com/flutter/plugins/blob/master/.cirrus.yml#L76-L78. That goes through a couple layers, but it ends up running flutter build ios --no-codesign https://github.com/flutter/plugin_tools/blob/194fcac6a8e4da55153b35765a4de59c9148d061/lib/src/build_examples_command.dart#L40-L48. I think the --no-codesign is probably why it's green in CI.

Ah, it's because it runs the migrator every time. Note the "Removing obsolete reference to flutter_assets from Runner.app" line.

$ flutter build ios --no-codesign
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building io.flutter.plugins.cameraExample for device (ios-release)...
Removing obsolete reference to flutter_assets from Runner.app

@mklim mklim merged commit 86d245f into flutter:master Sep 25, 2019
@jmagman jmagman deleted the build-camera branch September 26, 2019 17:43
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
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
Akachu pushed a commit to Akachu/flutter_camera that referenced this pull request Apr 27, 2020
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes submit queue The Flutter team is in the process of landing this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants