expo / turtle

Standalone app builder service
MIT License
385 stars 29 forks source link

Incorrect version/build number in iOS IPA’s Info.plist with Xcode 13 #333

Closed jhogervorst closed 2 years ago

jhogervorst commented 2 years ago

New Issue Checklist

Issue Description

The app version number (expo.version) and build number (expo.ios.buildNumber) are not correctly set in the build’s Info.plist when using npx turtle build:ios with Xcode 13.

Command executed
npx expo publish --release-channel XXX
npx turtle build:ios \
    --release-channel XXX \
    --team-id YYY \
    --dist-p12-path distribution-certificate.p12 \
    --provisioning-profile-path provisioning-profile.mobileprovision \
    --output build.ipa

Result

build.ipa/Payload/ExpoKitApp.app/Info.plist contains

    <key>CFBundleShortVersionString</key>
    <string>1.0</string>

and

    <key>CFBundleVersion</key>
    <string>2.15.3</string>

which are not the values I defined as expo.version and expo.ios.buildNumber in my app.config.json.

Environment

$ expo diagnostics
  Expo CLI 4.12.0 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.17.6 - /usr/local/opt/node@14/bin/node
      Yarn: 1.22.11 - /usr/local/bin/yarn
      npm: 6.14.15 - /usr/local/opt/node@14/bin/npm
      Watchman: 2021.09.13.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.11.2 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
      Android SDK:
        API Levels: 21, 30
        Build Tools: 30.0.3
        System Images: android-16 | Google APIs Intel x86 Atom, android-21 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 4.2 AI-202.7660.26.42.7351085
      Xcode: 13.0/13A233 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^42.0.0 => 42.0.3 
      react: 16.13.1 => 16.13.1 
      react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2 
    npmGlobalPackages:
      expo-cli: 4.12.0
    Expo Workflow: managed
$ turtle --version
0.22.5

Cause/workaround

The problem seems related to Xcode 13. After installing Xcode 12.5.1 and configuring it as version for my Command Line Tools using xcode-select, the problem disappeared.

This Fastlane issue seems like it might be related: https://github.com/fastlane/fastlane/issues/19352

thonatos commented 2 years ago

I have the same issue. - xcode@13.0

carlnx commented 2 years ago

Me too :( !!! Xcode 13.

brentvatne commented 2 years ago

thanks for the report, we'll look into it. a pr would also be welcome if anyone wants to dig in!

wkozyra95 commented 2 years ago

I just published turtle-cli@beta that should fix the issue. I'm not sure when this fix will land as latest because I need to make sure that it does not break older xcode versions

wkozyra95 commented 2 years ago

fix was released in the latest turtle-cli