No account for team "null" - flutter

$ flutter ios build --release
It shows Multiple valid development certificates available (your choice will be saved):
However it doesn't show the distribution certificate selection, I use --release flag though,,,
I checked I have installed production certification correctly in local machine.
Is there any clue to solve??
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
note: Using new build systemnote: Planning buildnote: Constructing build descriptionerror: No account for team "null". Add a new account in
the Accounts preference pane or verify that your accounts have valid credentials. (in target 'Runner' from project 'Runner')error: No
profiles for 'jp.****.****' were found: Xcode couldn't find any iOS App Development provisioning profiles matching
'jp.****.****'. (in target 'Runner' from project 'Runner')

#whitebear, I am assuming you're trying to release your iOS app? Have you tried manually configuring distribution certificate in Xcode? I usually do this,
Open Runner.xcworkspace in Xcode
Configure distribution certificate in Xcode
Run flutter build ios in Android Studio project terminal
Then archive in Xcode to publish

To address the 'No Account for team null' issue.
Make sure you have the DEVELOPMENT_TEAM build setting set properly.
I think this is because when you are sign your app with a a provisioning profile associated with a development team Xcode expects your DEVELOPMENT_TEAM building setting to match.
I typically let XCode Automatically Manage Signing when I'm building/running my app in development and thought that doing so would automatically set the DEVELOPMENT_TEAM build setting, but that doesn't seem to be the case.

Related

It appears that your application still contains the default signing identifier

The flutter app was working completely fine. After few days when i tried to run in ios device it said like this "open xcode and try product -> run and try fixing it . After doing this and still showed me the same error".
Product -> run ,
flutter clean ,
flutter packages get ,
open ios/Runner.xcworkspace ,
signing in General(target) ->select team
If anyone had their app running before and faced this error, what worked for me was (note I am using a Macbook pro), was to open up the terminal first.
Then navigate to the project folder and typing in open ios/Runner.xcworkspace.
This command will open up your xcode. From there you can select you device on the top (emulator or physical ios device), and click on run.
Once it builds and runs successfully, it will fix the issue you are facing, now you can go to VS code or android studio and try flutter run and it should work.
If you see this error when trying to run your app on your iPhone for the first time, it's because your xCode signing identifier contains a default one and needs updating.
Here's how to solved this issue:
In VsCode, right click the ios folder and click Xcode.
In XCode, click Runner , The top option on the left then 'Signing & Capabilities'
Click 'Automatically manage signing'
Select your Team, if you don't have one setup, click 'Add an account' and continue to the next step.
Select "Add your Apple ID"
Click Manage Certificates then click the '+' button located in the corner , then click 'Apple Development' to add a signing certificate.
Click Done. Signing Certificate should display 'Apple Development: yourAppleID..."
Select your connected iPhone from the build destination dropdown - see screenshot
Click the big play button to run the build in xCode
Trust your iPhone - Open your iPhone settings > General > Device Management or VPN & Device Management > Under Developer APP, select Apple Development : your appleID > Click Trust "Apple Development: "your apple id...."
Open vsCode and run flutter clean && flutter run.
To Fellow up with Harsh, if you have no paid Apple Developer license, your certificate runs out after a week.
In my case, I needed again to trust my developer certificate on my iPhone, again. Before that, I also received your error. If you open up your app with Xcode, you will see the real error message.
Building for iOS, but the linked and embedded framework 'App.framework' was built for iOS Simulator. (in target 'Runner' from project 'Runner')
You are encountering this error because com.example hasn't been registered as a Bundle ID on your developer account. I encountered this error while trying to use platform methods. I rectified the issue by creating a new Bundle ID on my Apple Developer Account - something like com.abc.appName. Here, abc is the name of my company. And then created a new project with this Bundle ID. Open up Xcode and under Runner -> Runner Target -> Signing and Capabilities add your Team name and make sure the automatically manage signing option is turned on
My issue was that I added the exclusion of arm64 in Xcode because my simulator was not running due to some dependency (google map?). When i deleted this arm64 exclusion for ios sdk (left it for simulator) inside xcode, runner, build settings, excluded architecture. The app could run again on physical device.
The default signing identifier is com.example.
Sounds like you haven't changed it.

How to select Development team for iOS app created in Flutter

I am trying to deploy an iOS app to Device using Google's Flutter, but I get this error on the command line:
Building an iOS app requires a selected Development Team with a Provisioning Profile
Please ensure that a Development Team is selected by:
1- Opening 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- In the 'General' tab, make sure a 'Development Team' is selected
For more information, please visit:
https://flutter.io/setup/#deploy-to-ios-devices
Or run on an iOS simulator
Where and how do I do this? There is no "ios/Runner.xcworkspace" in the project. I know the installed Certificates and Provisioning profile work on my Mac, because I created and installed an app on my iOS device using Appcelerator, and it found everything I needed, and ran perfectly on device.
Select Runner, and navigate to Signing & Capabilities, under Signing, check Automatically manage signing, after that choose a Team from the list, and you're done.
You have to sign in with your appleID at 'signing'. After that you can select your 'personal team'.
open ios/Runner.xcodeproj and follow the same instructions should work? Runner.xcodeworkspace is a relatively new addition to the template, created to allow Flutter projects to integrate better with CocoaPods.
If that doesn't work, please let us know.

Code signing certificate error in Appium XCUITest

I am trying UI automation of IOS 10 using Appium XCUITest.
On running script, it tries to build WebDriverAgent and fails at this point. I have added the provisioning profile and added the account in Xcode through the UI but not sure from where does XCUITest take the profiles while running or if we need to provide some information in desired capabilities.
info Xcode Testing failed:
info Xcode Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
info Xcode Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.0'
info Xcode ** TEST FAILED **
You can fix it as follows:
enters from the Finder to the following path:
/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
open: WebDriverAgent.xcodeproj
select the targets:
WebDriverAgentLib
WebDriverAgentRunner
go to General tab -> Signing
and place the team
view image:
solution appium
This issue occurs for Appium 1.6.X, in order to fix the issue please follow the steps:
Go to your Appium folder and find appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj file or you can search for the file name.
Open the file using Xcode.
Select WebDriverAgentLib and In general tab select 'Automatically Manage Signing" and select an id in team dropdown (Ask your developement team to provide you the team id).
Now select the next WebDriverAgentRunner and do the same thing as you did for the WebDriverAgentLib.
In case you get some errors just go to the 'Build Settings' tab and change the "Product Bundle Identifier" from "com.facebook.WebDriverAgentLib" to "com.facebook.WebDriverAgentLibNew".
Come back to general tab and the errors should be fixed.
Now build both WebDriverAgentLib and WebDriverAgentRunner.
When you get the Build succeed message, run your test again.

Application failed codesign verification. What do I do?

Xcode gives me this warning when I build the app for release.
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Do I need to delete all entries from my keychain and redo getting a certificate, provisioning profile, etc?
I can build and debug on the iPhone and iPad without a problem.
If you know how I can solve this dilemma, please provide exact steps or a way for me to contact you about this.
Thanks
----UPDATE -----
Build Log
Validate build/Release-iphoneos/iApp.app
cd "/Users/iosdeveloper/Documents/Programming/iPad/iApp HD"
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv PRODUCT_TYPE com.apple.product-type.application
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation "/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app"
warning: Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Executable=/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app/iApp
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app: valid on disk
/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app: satisfies its Designated Requirement
test-requirement: failed to satisfy code requirement(s)
codesign_wrapper-0.7.10: failed to execute codesign(1)
- (null)
Here's the checklist I go through when I've hit this:
Clean all targets, exit Xcode, then go drag the build folder from your project to the trash.
Do the Get Info on your project, make sure the Code Signing Entitlements and Code Signing Identity are selected correctly. Do the same for your Targets.
Login to the iOS Provisioning Portal and make sure the Distribution certificate has not expired. Also check the Distribution Provisioning Profile and make sure it is Active. Make sure the Certificate is properly in your Keychain and the Distribution profile is in Xcode Organizer (if you have multiple of the same one, delete all but the correct one and redo step #2).
Look at your Build Results on the failure and identify which profile it is actually using and make sure it is the right one.
You probably need to check what code signing profile is selected in your distribution build properties.
It looks like your target is "Development" but Xcode applied some of distribution settings to it, so the warning simply means your ad-hoc build has no valid AppStore submission certificate. Go to your target settings, choose the Release configuration and uncheck "Validate Built Product" option.
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
i am got the Same Warning Message...
I just Changed to iOs Deployment target 4.3 to 3.2.2 its works perfectly .....
Note: you may have to go to XCode's "Project" and select "Edit Active Target (appname)",
which is near the bottom of the list ... in the new pane that opens, select "Build", then
under "Code Signing Identity" select your distribution provision. Note that this seems
to be editing a different thing than "Project" / "Edit Project" (editing "target" instead
of "project"). I found I had to edit both project and target's code signing identities.
I had exactly the same problem. It was due to installing Xcode 4.0.2 and 4.2 preview 3 at the same time. Removed both (through the provided uninstall scripts):
<Xcodedir>/Library/uninstall-devtools --mode=all
Then rebooted and installed 4.0.2 and it works :/
I have found the codesign process a headache - I always shudder when I get am ready to use Ad Hoc distribution to beta test. After the usual round of errors and failed fix attempts I ignored the "application failed codesign" error and sent the build to a beta tester. It worked without issue.
Very frustrating.
In the build log provided in the -UPDATE- section of the original post the root cause of the failed signature verification is expressed with the text:
"test-requirement: code failed to satisfy specified code requirement(s)". That particular flavor of failed signature verification is almost always caused by mistakenly signing your app with an iPhone Developer profile instead of an iPhone Distribution profile.
It can be confirmed with the steps in "How do I verify the certificate that was used to sign my app?". If the certificate "Identity" is "iPhone Developer: YOUR_NAME" instead of "iPhone Distribution: ..." that is the reason for the "Application failed codesign verification" error, and you can resolve it by performing the following steps:
1a). if you have not yet created an App Store Distribution Provisioning Profile yet, that is done on the "Distribution" tab of the "Provisioning" Section of the iOS Portal site.
Note, the "Distribution" tab is only available to Team Members whose role is either "Agent" (the one who signed up for the iOS Developer Program), or "Admin" (those that the Agent grant access to app-distribution capabilities).
1b). if you're fairly certain you have an App Store Distribution Provisioning Profile installed in your Xcode profile library, you can verify it is an App Store profile as well as the App ID associated to it by using the steps in section How do I confirm my Provisioning Profile is for App Store distribution?
2). verify that your Scheme 'Archive' task is mapped to "Release" using the steps in section:
"Creating an Application Archive"
3). check that you have an your App Store provisioning profile assigned to your "Release" Code Signing Identity using the steps in section
"Assigning Provisioning Profiles to Build Configurations".
Note: it's important to make these changes at the Target level Build Settings, versus the Project level ones, as Target settings override Project ones...you can think of the Project level build settings as 'defaults' to populate target settings (and any future targets) with. Also, Ensure the "All" button is depressed in the upper-left corner of Target Build Settings to reveal the "Code Signing Identity" section.
4). retry your Product > Archive.
If the issue persists after the above, I recommend continuing onto Apple's complete list of potential causes of this error at the following URL "How do I resolve the error: Application failed codesign verification?"
My problem was solved when I noticed that I only had a "team" provisioning profile, and the details in iOS Dev Center told me that it was not a profile fit for development because it had no device attached. So I created a second provisioning profile, which let me check the box for my device so that it had a device attached.
Then when validating or submitting the app from the Organizer window (after pressing 'Build and archive'), I first made the mistake of selecting this new profile as the code signing profile. That was wrong. The profile that worked was iPhone Developer.
Good luck!
PS: This whole submission process is a heap of abacadabra. Do you really have to create a zillion distribution profiles, provisioning profiles, etc.? It hasn't encouraged me in any way to better test my app. I already did that before I chose to upload, and clicking a hundred buttons labeled 'Create','Download' and 'Submit' isn't really a quality control process that added anything (well except being forced to buy an iPad and test on that). Who ever said iOS was developer friendly?
My problem was that the Archive scheme did not have Build Configuration of App Store, but of Release. To change this, go to Product -> Edit scheme, select Archive on left side and change Build Configuration to App Store. I am assuming the code signing is configured properly (with distribution certificate).
You probably created a new certificate without refreshing the provisioning profiles
Create your iOS Distribution Provisioning Profile for App Store Distribution
I solved this by deleting the Archive that's not validating from the Organizer, closed and reopened Xcode and built for Archiving again.
I then chose Archive from the drop down menu. After doing that my app passed validation.
Hope that helps.

iPhone Build Error (Entitlements)

I'm getting this error when trying to build:
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.
(0xE8008016).
This is not my first time building apps. This will be my sixth app, so this thing is tripping. I'm making an AppStore distribution build, so I dont need entitlements. I dont have any entitlement files specified in my code signing entitlement. ITS BLANK. For the project info pane and the target info pane, there is absolutely nothing in my code signing entitlements, which is how its supposed to be. Yet I still get this dumb error. Remember, this is NOT an adhoc build, rather it is an AppStore build. What can be the problem??
Do you have multiple versions of Xcode installed (such as one of the betas)? Did you change the install directory after installing your current stable version of Xcode? Xcode installs things for code signing that can break if you either install a new version of Xcode simultaneously, or you rename your /Developer directory.
Also, try checking the console for related error messages.