Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update iOS permissions config plugins to set in prebuild #28107

Merged
merged 7 commits into from
Apr 10, 2024

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Apr 9, 2024

Why

Prevent the config plugins from applying values statically in the infoPlist object, this ensures we don't accidentally leak info when evaluating the config for non-prebuild related reads.

  • Update: It would seem like using this helper method would unify the behavior a lot more across the SDK. I've migrated everything to it.

How

Test Plan

  • It's a bit challenging to test prebuild compilation e2e, so I added some basic text structure and utilities to prebuild-config which we can use internally to test against the latest template.

Checklist

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Apr 9, 2024
@EvanBacon EvanBacon requested a review from Kudo as a code owner April 9, 2024 17:53
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Apr 9, 2024
@expo-bot
Copy link
Collaborator

expo-bot commented Apr 9, 2024

The Pull Request introduced fingerprint changes against the base commit: cf52a62

Fingerprint diff
[
  {
    "type": "file",
    "filePath": "../../packages/@expo/config-plugins/build/ios/index.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "39aa610963c60135b42a31dfa9721e239eb49f54"
  },
  {
    "type": "file",
    "filePath": "../../packages/@expo/config-plugins/build/ios/Permissions.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "301690d974192122cb35622ec790728c354cb9eb"
  },
  {
    "type": "file",
    "filePath": "../../packages/expo-location/plugin/build/withLocation.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "77a4dcd4aa58c845f61bd217cfd9d21a0459bb4b"
  },
  {
    "type": "file",
    "filePath": "../../packages/expo-tracking-transparency/plugin/build/withTrackingTransparency.js",
    "reasons": [
      "expoConfigPlugins"
    ],
    "hash": "ec7daf9209daf408c9010c96f1ab2664b706b646"
  },
  {
    "type": "contents",
    "id": "expoConfig",
    "contents": "{\"android\":{\"adaptiveIcon\":{\"backgroundColor\":\"#000020\",\"foregroundImage\":\"./assets/adaptive-icon.png\"},\"package\":\"dev.expo.payments\",\"permissions\":[\"android.permission.ACCESS_BACKGROUND_LOCATION\",\"android.permission.ACCESS_COARSE_LOCATION\",\"android.permission.ACCESS_FINE_LOCATION\",\"android.permission.FOREGROUND_SERVICE\",\"android.permission.FOREGROUND_SERVICE_LOCATION\",\"android.permission.RECEIVE_BOOT_COMPLETED\",\"android.permission.WAKE_LOCK\",\"com.google.android.gms.permission.AD_ID\"],\"scheme\":[\"com.googleusercontent.apps.29635966244-knmlpr1upnv6rs4bumqea7hpit4o7kg2\"]},\"extra\":{\"eas\":{\"projectId\":\"2c28de10-a2cd-11e6-b8ce-59d1587e6774\"}},\"facebookAppId\":\"629712900716487\",\"facebookDisplayName\":\"Expo APIs\",\"facebookScheme\":\"fb629712900716487\",\"icon\":\"./assets/icon.png\",\"ios\":{\"bundleIdentifier\":\"dev.expo.Payments\",\"requireFullScreen\":false,\"scheme\":[\"com.googleusercontent.apps.29635966244-v8mbqt2mtno71thelt7f2i6pob104f6e\",\"msauth.dev.expo.Payments\"],\"supportsTablet\":true},\"name\":\"BareExpo\",\"notification\":{\"serviceWorkerPath\":\"/expo-service-worker.js\",\"vapidPublicKey\":\"BNHvR05XkY5LH9GdN0GreLx2wZnK9IwNJGVmo3jujIkFni4of26E3U3fnt9nUrZfM7h0omdIHKM0eshkzTSFOWQ\"},\"platforms\":[\"android\",\"ios\",\"web\"],\"plugins\":[\"./plugins/withAndroidNetworkSecurityConfig\",\"expo-background-fetch\",\"expo-video\",[\"expo-font\",{\"fonts\":[\"./assets/icomoon.ttf\"]}],[\"expo-location\",{\"isAndroidBackgroundLocationEnabled\":true}],[\"expo-notifications\",{\"color\":\"#4630EB\",\"icon\":\"./assets/ic_stat_notifications.png\",\"sounds\":[\"./assets/notification.wav\"]}],[\"expo-tracking-transparency\",{\"userTrackingPermission\":\"Allow Expo projects to use data for tracking the user or the device\"}]],\"privacy\":\"unlisted\",\"scheme\":\"bareexpo\",\"sdkVersion\":\"51.0.0\",\"slug\":\"bare-expo\",\"splash\":{\"backgroundColor\":\"#000020\",\"image\":\"./assets/splash.png\",\"resizeMode\":\"cover\"},\"updates\":{\"url\":\"https://u.expo.dev/2c28de10-a2cd-11e6-b8ce-59d1587e6774\"},\"version\":\"1.0.0\"}",
    "reasons": [
      "expoConfig"
    ],
    "hash": "460cfb56ae814ba5c8a9c630ae5938835986ec7f"
  }
]

Generated by PR labeler 🤖

@expo-bot expo-bot added bot: suggestions ExpoBot has some suggestions and removed bot: passed checks ExpoBot has nothing to complain about labels Apr 9, 2024
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Apr 9, 2024
@EvanBacon EvanBacon merged commit 55c31a0 into main Apr 10, 2024
22 checks passed
@EvanBacon EvanBacon deleted the @evanbacon/sdk/update-permissions-config-plugins branch April 10, 2024 23:19
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants