xcode error: The selected run destination is not valid for this action - iphone

my app in 4.3 simulator and device work well. Now i want to test it in 4.0 simulator and i have also 4.2.1 device. So i set ios deployment target to 4.0 (tried also 4.2), but xcode give me that error :The selected run destination is not valid for this action.
Then i added my second iphone to provisioning profile and i see it in device in xcode for build but same thing: The selected run destination is not valid for this action.
How can i read (or if one can explain me) where to find how to setup project for run in 4.0 4.2 and 4.3 simulator for example?
I'm trying to "click everywhere" also in manage schemes but can't find nothing usefull.
Thx in advice.

You need to set the iOS Deployment Target on both the Project and the Target items. When you click the project icon in the Project navigator, on the left side you will se two groups, Project and Targets. Project will contain your project, and the Targets section will have your app and unit test targets. Set the iOS Deployment on your project settings and in the target (app, not tests) settings.

You need to change the base SDK for the project:
1) Click on your PROJECT_NAME in the Project Navigator
2) Click on your PROJECT_NAME under the 'PROJECT' label on the next panel
3) Click on the 'Build Settings' tab
4) Under 'Architectures'->'Base SDK' -> 'Debug', select the 'Latest (iOS4.3)'
5) Under 'Code Signing'->'Debug'->'Any iOS SDK', select your Apple Provisioning Profile
6) Under your project schemes you should be able to select iPhone/iPad.
Voila!
PS: You should be able to see all the SDKs that you have installed on step 4).

Check your SDK and sign in identity in your build configuration. That's how I solved this issue.

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.

SDK Verision dont match

hi my IPhone device has 4.2.1 version, my xcode is saying 4.2 version. Is this any issue because i cant debug my app on device. also the developer folder has iphoneentitlements401 folder, shouldnt it be 4.2 instead of 401?
i am getting cannot read entitlements data ERROR. please help!
SDK Support:
You need to set your IOS Deployment Target to the lowest SDK you want to support. So you would need to set yours to at least 4.2.
Go to Project -> Edit Project Settings -> Scroll down to Deployment, then find IOS Deployment Target
For Entitlements:
Your entitlements file, if it exists, may be corrupt, remove it if you have it, then add a new one:
Right-click on your Project, then click Add, then New File and under iOS click on Code Signing and choose Entitlements.

iOS Deployment Target Missing

I'm updating an older iPhone application, and the usual 'Base SDK Missing' pops up. When I open the project settings and try to set the 'iOS Deployment Target,' it's not in the list. This is the first time I've encountered this.
I'm able to set the Base SDK to 'Latest SDK' but many of the options are missing from the settings.
What should I do to update this project so it has all the settings?
Did you select "Base SDK for all configurations" in the General tab of the Project Settings to your Latest SDK as if you dont set the base SDK there then by default it will show as " < Multiple Values > ".
Cheers
Change to the latest deployment target in the project settings and then reload the project. Failing that restart Xcode but this is not necessary.
To fix this error, I had to also change: Build -> Edit Active Target -> Build -> Architecture -> Base SDK
I had the same problem. but solved it this way:
Select your project in the left hand side, then select the target, and then in SUMMARY, select the deployment target.
My problem was that I had not seen this summary page, and it was so simple!

iphone simulators and devices are not listed at 'Base SDKs' on Xcode 'edit project settings'

I installed 'xcode_3.2.5_and_ios_sdk_4.2_final.dmg'.
When i build a project, xcode say below
"error: There is no SDK with the name or path 'iphoneos3.2'"
So, I checked this site, and i find out like that you should select 'iphone simulator 4.x' to 'Base SDKs' on Xcode 'edit project settings'.
But, I can not select iphone simulator 4.x.
There are no 'Iphone Simulator x.x' in Base SDKs list as below. also there are no 'Iphone Device x.x' too.
Base SDKs selections
Current Mac OS
Mac OS X SDKs
 ∟ Mac OS X 10.5
 ∟ Mac OS X 10.6
 ∟ Latest Mac OS X (Currently set to Mac OS X 10.6
iOS SDKs
 ∟ iOS 4.2
 ∟ Latest iOS (Currently set to iOS 4.2)
other..
※I want to upload image capture, But new user is not allowed.
How Can i select 'Iphone Simulator x.x'?
Please Help!
Right click your project's root title, select "Get info"
Inside the menu you make sure you select this: Base SDK -> Lastest(iOS 4.2....)
Besides, do the same process to your Target file. See my third screenshot.
Please, do what diwup says, then:
Open your project file (the one that has the .xcodeproj extension) with a text editor and find the line where the old version is written:
Delete the line SDKROOT = iphoneos3.2;
Re-open your project.
That's what I just did.
Right click your project's root title, select "Get info"
Inside build menu Plz set ios deployemnt target to ios 3.2..
You can just select "Latest iOS (Currently set to iOS 4.2)", for most projects it is the best choice.
You need to select "Latest iOS" in the "Base SDK" build setting popup and "iOS 3.2" in the "iOS Deployment Target" build setting popup. Now you can select an older iOS Simulator in the "Overview" popup in the top left corner of the project window.
You should set both of these in the project build settings and clear any selection in the target build settings (select each in the build settings window and press the Delete key), unless there is some specific reason you need custom settings for different targets in your project.
(You can also choose older version in iOS Simulator itself, via the "Hardware" menu.)

How to build for iPhone 3.0 SDK?

I'm pretty new to iPhone. My dev env is setup, XCode has just two profiles: iPhone device 3.1.2 (base sdk) and iphone simulator 3.1.2, either one with release and debug.
I fear I will run into problems now, if I ad hoc deploy to < 3.1.2 phys devices. How can I build for 3.0 base sdk only?
Kind regards
PS: stackoverflow is a great source of knowledge. Most of the Google queries I had during the past 2 weeks did land here :)
Double click your application name under "Groups & Files" then go to the "Build" tab and change the "Base SDK" to "iPhone Device 3.0"
Double click on your project name with icon in xcode. This will open project info of your project.
Select the build tab in it.This will the build and environment related properties of your project.
Go to architecture and set the base sdk as whatever you want.This will change the base sdk.
You should give a check "Configuration" value also that is it set for the profile you want
Hope this helps.