Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Silence dependency analysis warning #7698

Closed
wants to merge 1 commit into from

Conversation

frederoni
Copy link
Contributor

@frederoni frederoni commented Jan 12, 2017

#6948 fixed a compile-time error that started with Xcode 8.1 but introduced a new warning in 8.2

screenshot 2017-01-12 14 42 28

This PR fixes that by specifying the correct Info.plist instead of the Root.plist that's bundled in settings.

https://developer.apple.com/library/content/qa/qa1649/_index.html

Verified that the Settings.bundle is still working:
screenshot 2017-01-12 15 16 25

@frederoni frederoni added the iOS Mapbox Maps SDK for iOS label Jan 12, 2017
@frederoni frederoni added this to the ios-v3.4.0 milestone Jan 12, 2017
@mention-bot
Copy link

@frederoni, thanks for your PR! By analyzing this pull request, we identified @1ec5, @boundsj and @friedbunny to be potential reviewers.

@frederoni frederoni force-pushed the fred-silence-analysis-warning branch from b9526f8 to dbb29d9 Compare January 12, 2017 13:56
@frederoni frederoni self-assigned this Jan 12, 2017
@frederoni frederoni force-pushed the fred-silence-analysis-warning branch from dbb29d9 to 4f3ab0c Compare January 12, 2017 14:06
@frederoni frederoni added the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Jan 12, 2017
@frederoni frederoni removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Jan 12, 2017
@@ -2349,7 +2349,7 @@
DA25D5BC1CCD9EDE00607828 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = framework/Settings.bundle/Root.plist;
INFOPLIST_FILE = "framework/Info-static.plist";
Copy link
Contributor

Choose a reason for hiding this comment

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

This build setting is part of the settings target, which produces Settings.bundle, not Mapbox.framework. Doesn’t this mean Settings.bundle will contain an Info.plist that describes the entire framework?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would. Same goes for the Bundle.bundle which the static target also depends on. (I copied this from the bundle target)
Is the Settings.bundle only meant to be used in iosapp?

Copy link
Contributor

Choose a reason for hiding this comment

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

Settings.bundle is an example meant to be used in any iOS application. A Settings bundle isn’t supposed to have an Info.plist, though.

@1ec5 1ec5 changed the title Silence analysis warning Silence dependency analysis warning Jan 12, 2017
@1ec5 1ec5 modified the milestones: ios-3.4.1, ios-v3.4.0 Jan 13, 2017
@1ec5
Copy link
Contributor

1ec5 commented Jan 13, 2017

Moving to v3.4.1 because this issue doesn’t impact shipping code and may well be a regression in Xcode. (A settings bundle isn’t supposed to have an Info.plist to begin with.)

@1ec5 1ec5 modified the milestones: ios-v3.4.1, ios-v3.4.2 Jan 25, 2017
@1ec5 1ec5 modified the milestones: ios-v3.5.0, ios-v3.4.2 Feb 17, 2017
@1ec5
Copy link
Contributor

1ec5 commented Mar 4, 2017

Since this PR is scheduled for iOS SDK v3.5.0, it needs to be rebased and retargeted at the release-ios-v3.5.0-android-v5.0.0 branch.

@1ec5 1ec5 modified the milestones: ios-v3.5.0, ios-v3.6.0 Mar 9, 2017
@boundsj boundsj added the build label Mar 28, 2017
@friedbunny
Copy link
Contributor

What’s the status of this, now that Xcode 8.3 is available?

@1ec5
Copy link
Contributor

1ec5 commented Mar 30, 2017

This whole saga started with a code-signing error: #6947. Do we even need to code-sign the Settings.bundle if it’s going to be plopped into an application bundle at the end of the day?

@frederoni frederoni force-pushed the fred-silence-analysis-warning branch from 4f3ab0c to caf6903 Compare April 10, 2017 15:49
@frederoni frederoni changed the base branch from release-ios-v3.4.0 to master April 10, 2017 15:50
@frederoni frederoni added the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Apr 10, 2017
@boundsj boundsj modified the milestones: ios-v3.7.0, ios-v3.6.0 Jun 22, 2017
@lilykaiser lilykaiser removed this from the ios-v3.7.0 milestone Sep 18, 2017
@frederoni frederoni force-pushed the fred-silence-analysis-warning branch 2 times, most recently from debc049 to 2031c2f Compare September 19, 2017 15:13
@frederoni frederoni removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Sep 25, 2017
@frederoni
Copy link
Contributor Author

Migrating the project to Xcode 9 also removes the plist from build phases which confirms that this is the right fix.

@@ -2110,7 +2109,6 @@
buildActionMask = 2147483647;
files = (
DA25D5C61CCDA06800607828 /* Root.strings in Resources */,
DA25D5C01CCD9F8400607828 /* Root.plist in Resources */,
Copy link
Contributor

Choose a reason for hiding this comment

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

I’m confused by this change. We’re removing Root.plist from the Copy Files build phase, but it remains the bundle’s Info plist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which seems to be correct, no? It's what you get when you create a new framework from scratch. The plist is bundled in the framework but omitted from the Copy Files build phase.
(https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html)

Copy link
Contributor

Choose a reason for hiding this comment

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

But the file in the resulting bundle is called Info.plist, not Root.plist, right? Does the Settings screen show the correct content after installing this bundle?

Copy link
Contributor Author

@frederoni frederoni Sep 26, 2017

Choose a reason for hiding this comment

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

🙈 Back to square one. We don't want to use an Info.plist but we are forced to use one.

@boundsj boundsj removed their request for review January 12, 2018 00:13
@friedbunny
Copy link
Contributor

friedbunny commented Aug 6, 2018

There appears to be no good way to get Xcode to not warn about our non-standard, example-only Settings.bundle.

@friedbunny friedbunny closed this Aug 6, 2018
@friedbunny friedbunny deleted the fred-silence-analysis-warning branch August 6, 2018 15:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants