首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么在构建颤振应用程序时没有生成ipa文件?

为什么在构建颤振应用程序时没有生成ipa文件?
EN

Stack Overflow用户
提问于 2022-11-22 10:18:55
回答 2查看 34关注 0票数 0

当我使用此命令构建ios ipa文件时:

代码语言:javascript
复制
➜  ios git:(master) ✗ ~/fvm/versions/2.5.0/bin/flutter build ipa                       
Changing current working directory to: /Users/xiaoqiangjiang/source/reddwarf/frontend/flutter-netease-music
Archiving com.reddwarf.musicapp...
Automatically signing iOS for device deployment using specified development team in Xcode project: 6JP4P88ZJB
Running pod install...                                             960ms
Running Xcode build...                                                  
 └─Compiling, linking and signing...                         4.7s
Xcode archive done.                                         40.8s
Built /Users/xiaoqiangjiang/source/reddwarf/frontend/flutter-netease-music/build/ios/archive/Runner.xcarchive.

 Building with sound null safety 

我没有在build文件夹中找到ipa文件。我应该做什么来生成ipa文件?日志输出没有显示任何错误,也没有显示ipa文件路径。我发现颤振存档选项是不可否认的:

我已经尝试将info.plist文件添加到${PROJECT}/ios/Runner/Info.plist

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleDisplayName</key>
    <string>Music</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>dolphin</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>$(FLUTTER_BUILD_NAME)</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>$(FLUTTER_BUILD_NUMBER)</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
    <key>UIBackgroundModes</key>
    <array>
        <string>audio</string>
        <string>bluetooth-central</string>
        <string>bluetooth-peripheral</string>
        <string>external-accessory</string>
        <string>fetch</string>
        <string>location</string>
        <string>processing</string>
        <string>remote-notification</string>
        <string>voip</string>
    </array>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>CADisableMinimumFrameDurationOnPhone</key>
    <true/>
</dict>
</plist>

当我使用xcode 14.1存档应用程序时,它可以工作,但不能用flutter命令构建应用程序。

EN

回答 2

Stack Overflow用户

发布于 2022-11-22 10:51:58

首先,尝试使用flutter build ipa生成您的ipa,如果没有出现错误,您将在build名称中找到您的ipa作为存档,您只需要用xcode打开它。

票数 0
EN

Stack Overflow用户

发布于 2022-11-23 15:08:04

最后,我尝试使用这个命令构建:

代码语言:javascript
复制
~/fvm/versions/2.5.0/bin/flutter build ipa --export-options-plist=/Users/xiaoqiangjiang/source/reddwarf/frontend/flutter-netease-music/ios/Runner/Info.plist --release
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74530987

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档