Failing to deploy a Flutter app on my attached Ipad - ios

I am developing a personal flutter app on a Mac and trying to deploy to my Ipad attached by USB.
I have created a provisioning profile on my Apple developer account however I don't know how to use it for Flutter.
My error from Android builder is:
Launching lib/aopAppMain.dart on Chris’s iPad in debug mode...
Signing iOS app for device deployment using developer identity: "iPhone Developer: chrisr#instantobjects.com (XXXXXXX)"
Starting Xcode build...
Xcode build done. 1.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
Code Signing Error: "Runner" requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.0'
Could not build the precompiled application for the device.
Error launching application on Chris’s iPad.
If I load the project in XCode it only has an Info tab and a Build Settings tab.
If I fire up a swift project, the Provisioning Profile assignment seems to happen on the General Tab and at least my Flutter project hasn't got one of those in XCode.

I used flutter create to create a new app and migrated my source across and everything is now ok.

Related

Xcode couldn't find any iOS App Development provisioning profiles matching

I'm Building an App with Flutter. It running fine but when I trying to prepare for App-Store release using flutter build iOS OR flutter build ipa its showing the following error. I'm new to this iOS environment. (I do login with my developer account). Do I have to make any changes in Xcode Runner ?
Sambits-MacBook-Air:sleepkart sambitdas$ flutter build ios
Building com.sleepkart.team for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: SDW79QN7H3
Running Xcode build...
Xcode build done. 4.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
error: No profiles for 'com.sleepkart.team' were found: Xcode couldn't find any iOS App Development provisioning profiles matching
'com.sleepkart.team'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass
-allowProvisioningUpdates to xcodebuild. (in target 'Runner' from project 'Runner')
Encountered error while building for device.
Sambits-MacBook-Air:sleepkart sambitdas$

Trouble running flutter apps on most iOS devices

I am trying to be able to run flutter apps consistently on iOS. I have changed some settings on the iOS side a while ago, and now things are a bit wonky. I can build the default Xcode hello world app on all the iOS devices I have tried, so as far as I know I have registered with Apple correctly. I have not run into issues with the iOS simulator. I have not found a way to run any app on most devices. If I create a brand new flutter app, or change the bundle id (explained later) the I am only able to run apps on one specific iPhone. So I have two problems that I believe are related:
I am only able to run apps correctly on one specific device (iPhone 7 Plus). If I try a different device I get the following:
Signing iOS app for device deployment using developer identity: "Apple Development: roboteng#gmail.com (8SXLAQ739Z)"
Running Xcode build...
Xcode build done. 6.2s
Installing and launching...
════════════════════════════════════════════════════════════════════════════════
No Provisioning Profile was found for your project's Bundle Identifier or your
device. You can create a new Provisioning Profile for your project in Xcode for
your team 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
It's also possible that a previously installed app with the same Bundle
Identifier was signed with a different certificate.
For more information, please visit:
https://flutter.dev/setup/#deploy-to-ios-devices
Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
2020-03-02 16:00:36.364 ios-deploy[84718:1415325] [ !! ] Error 0xe8008015: A valid provisioning profile for this executable was not found. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Could not install build/ios/iphoneos/Runner.app on 4f97b33c580c63029de5ef1caf08be5d781276db.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Error launching application on Trevor’s iPad.
With the iPhone that does work, if I get a stub project from someone else (e.g. app brewery lessons) I need to manually change the bundle identifier from the default to PRODUCT_BUNDLE_IDENTIFIER = co.tws.quizzler; within the file ios/Runner.xcodeproj/project.pbxproj
If I haven't changed this line I get:
Signing iOS app for device deployment using developer identity: "Apple Development: roboteng#gmail.com (8SXLAQ739Z)"
Running Xcode build...
Xcode build done. 3.2s
Failed to build iOS app
Error output from Xcode build:
↳
2020-03-02 16:24:42.613 xcodebuild[88704:1485906] DVTPortal: Service '<DVTPortalAppIDService: 0x7ff77316d6b0; action='addAppId'>' encountered an unexpected result code from the portal ('9401')
2020-03-02 16:24:42.614 xcodebuild[88704:1485906] DVTPortal: Error:
Error Domain=DVTPortalServiceErrorDomain Code=9401 "An App ID with Identifier 'co.appbrewery.miCard' is not available. Please enter a different string." UserInfo={payload={
creationTimestamp = "2020-03-02T23:24:42Z";
httpCode = 200;
protocolVersion = QH65B2;
requestId = "27B41E22-9D92-48E4-8250-CFA4509E2156";
requestUrl = "https://developerservices2.apple.com/services/QH65B2/ios/addAppId.action";
responseId = "cdd5da76-1c76-4b8a-9298-fde35173de63";
resultCode = 9401;
resultString = "An App ID with Identifier 'co.appbrewery.miCard' is not available. Please enter a different string.";
userLocale = "en_US";
userString = "An App ID with Identifier 'co.appbrewery.miCard' is not available. Please enter a different string.";
}, NSLocalizedDescription=An App ID with Identifier 'co.appbrewery.miCard' is not available. Please enter a different string.}
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
Code Signing Error: Failed to register bundle identifier. The app identifier "co.appbrewery.miCard" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
Code Signing Error: No profiles for 'co.appbrewery.miCard' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'co.appbrewery.miCard'.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'
Could not build the precompiled application for the device.
Error launching application on Trevor’s iPhone.```

jenkins not able to build share extension ios xcode

I am getting following error while making build from jenkins.
Check dependencies
Code Signing Error: There are no accounts registered with Xcode. Add your developer account to Xcode
Code Signing Error: No profiles for 'com.company.xmessage.xmessageShareAction' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.company.xmessage.xmessageShareAction'.
Code Signing Error: Code signing is required for product type 'App Extension' in SDK 'iOS 11.3'
It build fine with xcode.

How to build and deploy an ios api file in real device using MAC

i am new to mac, so for i have installed xcode and successfully added the platform for ios.
When i give adb devices i am not able to detect my device name for iphone but when i connect android and give adb devices i am getting my device .
when i give ionic build ios i'm getting the following errors. i don't know how to enable the developer option in iphone
=== BUILD TARGET myFirst OF PROJECT myFirst WITH CONFIGURATION Debug ===
Check dependencies
Signing for "myFirst" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.3'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/subbarao/Desktop/myFirst/platforms/ios/cordova/build-debug.xcconfig,-workspace,myFirst.xcworkspace,-scheme,myFirst,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,myFirst.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/subbarao/Desktop/myFirst/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/subbarao/Desktop/myFirst/platforms/ios/build/sharedpch
You need a development provisioning profile on your build machine. Apps can run on the simulator without a profile, but they are required to run on an actual device.
If you open the project in Xcode, it may automatically set up provisioning for you. Otherwise you will have to create go to the iOS Dev Center and create a profile.
cordova run with ios error .. Error code 65 for command: xcodebuild with args:
Same question here by this guy
Try to sign in as ios dev account in Xcode
or try
ionic platform remove ios
ionic platform add ios
i was getting the same error but i tried the above command and its working now
thanks

How to test NativeScript app on real iPhone

I am new to NativeScript and I just made my first app. My app requires testing on a real iPhone; however, I don't know how to test it on a real iPhone and not the simulator. I tried looking at the appbuilder docs but I can't figure out how to just test it on an iPhone. I tried to use tns run ios while I had an iPhone plugged in but I get this:
=== BUILD TARGET LOKale OF PROJECT LOKale WITH CONFIGURATION Debug ===
Check dependencies
Signing for "LOKale" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Command xcodebuild failed with exit code 65
# run ios
I have no idea why I can't just run it on an iPhone. Can anyone tell me how to test it on a real iPhone or what I am doing wrong? Thanks in advance!
As shown in the link provided in the comments, to test on real device you will need to provide development team id.
Here are the steps to do it in NativeScript application:
Open app/App_Resources/iOS/build.xcconfig
Uncomment (or add) DEVELOPMENT_TEAM = YOUR_TEAM_ID;
Place your team id and rebuild your application
Update: You can also use
tns run ios --provision
to see the available provision profiles and build the app with
tns run ios --provision <my-provision-profile>

Resources