Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在codemagic中创建podfile?_Ios_Flutter_Codemagic - Fatal编程技术网

Ios 如何在codemagic中创建podfile?

Ios 如何在codemagic中创建podfile?,ios,flutter,codemagic,Ios,Flutter,Codemagic,我正在尝试使用Codemagic在windows中构建iOS颤振应用程序。我在android studio中创建了颤振项目,并将其上传到github,以便在Codemagic中使用它。。。但当我尝试构建iOS应用程序时,Codemagic向我抛出了以下错误: Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device. B

我正在尝试使用Codemagic在windows中构建iOS颤振应用程序。我在android studio中创建了颤振项目,并将其上传到github,以便在Codemagic中使用它。。。但当我尝试构建iOS应用程序时,Codemagic向我抛出了以下错误:

Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.jmmago.saltApp for device (ios-release)...
Running pod install...                                             16.0s
Running Xcode build...                                          
Xcode build done.                                           124.3s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/barcode_scan-3.0.1/ios/Classes/protos/protos.pb.swift:14:8: error: compiling for iOS 8.0, but module 'SwiftProtobuf' has a minimum deployment target of iOS 9.0: /Users/builder/clone/build/ios/Release-iphoneos/SwiftProtobuf/SwiftProtobuf.framework/Modules/SwiftProtobuf.swiftmodule/armv7-apple-ios.swiftmodule
    import SwiftProtobuf
           ^
    Command CompileSwift failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'barcode_scan' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'sqflite' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'shared_preferences' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'path_provider' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'image_picker' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'MTBBarcodeScanner' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'FMDB' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'Flutter' from project 'Pods')

════════════════════════════════════════════════════════════════════════════════
Building a deployable iOS app requires a selected Development Team with a 
Provisioning Profile. Please ensure that a Development Team is selected by:
  1- Open the Flutter project's Xcode target with
       open ios/Runner.xcworkspace
  2- Select the 'Runner' project in the navigator then the 'Runner' target
     in the project settings
  3- Make sure a 'Development Team' is selected. 
     - For Xcode 10, look under General > Signing > Team.
     - For Xcode 11 and newer, look under Signing & Capabilities > Team.
     You may need to:
         - Log in with your Apple ID in Xcode first
         - Ensure you have a valid unique Bundle ID
         - Register your device with your Apple Developer Account
         - Let Xcode automatically provision a profile for your app
  4- Build or run your project again

For more information, please visit:
  https://flutter.dev/setup/#deploy-to-ios-devices

Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
Encountered error while building for device.


Build failed :|
Failed to build for iOS
在此过程中,他们解决了创建pod文件的相同问题。但是我如何创建一个pod文件呢?
我必须在我的项目中创建它,然后将它推送到github?或者有一种方法可以在Codemagic中创建它?

我认为在VSCODE中打开您的项目,并在所有3个地方将“IPHONEOS部署目标”更改为9.0就足够了。此外,检查AppFrameworkInfo.plist文件,并将MinimumiOSVersion设置为9.0

但是,如果您希望通过Codemagic创建一个podfile,那么您可以尝试在第一次运行时将其放入预构建脚本中(稍后将其删除):


cd ios和pod初始化和git添加git commit-m“Add Podfile to project”和&git push

默认情况下,“IPHONEOS_DEPLOYMENT_TARGET”和“MinimumiOSVersion”设置为9.0,这不是问题所在。我试过线路,得到了这个。然后,当我添加了
git config--global user.name“My name”
git config--global user.email时my@email.com
,出现此错误:
remote:greenhouseci团队对obedi123/salt-app.git的权限被拒绝。
致命:无法访问'https://github.com/myuser/myproject.git/“:请求的URL返回错误:403
有什么建议吗?当然,似乎确实存在访问问题,我认为最好的解决方案是使用“推送访问”向存储库添加Codemagic部署密钥。将公钥添加到存储库的“部署密钥”中,并将加密密钥添加到UI或.yaml中的环境变量中。例如,将名称设置为ACCESS_SSH_KEY-确保以_SSH_KEY结尾,这样Codemagic会自动将其添加到密钥中。然后使用以下命令更改远程:git remote在脚本之前设置url origin。快速演示:虽然可能是更简单的方法,但是在Github:上设置一个访问令牌并将其添加到您的ENV变量中,然后您应该能够在GitLab:上使用:git push“”在BitBucket上推送: