My iOS project installs fine on the iPhone but the application won't launch automatically for debugging.
I'm using Xcode 4.2 (Build 4C199), the latest version for Snow Leopard (10.6.8).
I've already tried deleting the app from the iPhone, restarting the device, cleaning the project and reinstalled xCode.
Any ideas on how to solve this problem?
In Xcode click on where the project name/Device or simulator version is (On the right of the Stop Button), and select Edit Scheme, on the Run Tab select Build Configuration -> DEBUG, and select a DEBUGGER -> GDB.
In my case, I created a new target and a new scheme by duplicating the existing ones, in order to test my app on devices with on older iOS version.
However, the copied scheme had as executable selected "None":
As soon as I selected the right executable there from the drop-down menu, the app launched.
I was having this problem as well. I removed the option Launch due to a background fetch event in Edit Scheme -> Run Debug -> Options and Xcode started launched the app again.
Hope that helps.
Can you confirm you are signing the app with a development certificate? This issue happens when you sign the app with a distribution certificate.
I've been able to solve this problem by Changing Debugger to LLDB, instead of GDB, on the Run Tab, using Build Configuration -> DEBUG, by selecting Edit Scheme (On the right of the Stop Button).
Related
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.
I have an issue where Xcode always launches my device builds through GDB. Even though I choose "Build & Run" and not "Build & Debug" from the Build menu it launches through GDB. My simulator launches works as they're supposed to - through GDB only when I choose "Build & Debug".
Is this normal behavior? It seems strange to me to not be able to launch normally on device.
I tried creating a new fresh project and that is also always launched through GDB so it seems that the error is in Xcode and not in a single project.
Are there any Xcode caches, preferences and stuff that might help deleting? I haven't tried uninstall and reinstall yet.
I'm running Xcode 3.2.3 and it's a fresh install on a new computer. I have not tried installing Xcode 4.
Yes it is normal behaviour. I saw a reference a long time ago that suggested that in fact that was the only way that a process could be remotely launched.
Why is it an issue?
Is it possible to build an xcode project for iPhone and have it install the result on a connected device without actually running the application? I'm currently using Build & Run, but I'm debugging a peer to peer game, so I have to build & run for two different devices, stop tasks on each of those and then build & run on the simulator so all three have the latest build. I'd love to not have to wait for the application to run on the two devices in this process.
You can drag and drop the built app (in your project build directory) into the Applications list of your device in the Organizer window.
Things have changed a little since this answer...
For simulator, you can drag/drop your recently-built app product from the Products folder in the Project Navigator straight onto the simulator window.
For a device, drag and drop the app product into "Installed Apps" when viewing the device in the "Devices" window.
If you're not quite sure where the built app is (the project build directory):
Xcode → Preferences → Locations tab → Derived Data will show the location.
There's more information in this question:
Xcode 4 - build output directory
There's another way to get it to install automatically without launching. Maybe not as useful for the OP's situation, but in my case I'm trying to profile app load times so I want to start the app without the debugger attached (which can slow down execution.)
Under the target scheme, right click and select "Edit Scheme". Make sure the run configuration is selected, and then look in the info panel. There's an option that says "Launch" - set this to "Wait for executable to be launched."
Now once it's installed it will wait for you to launch the app before attaching the debugger. However, you can just hit "Stop" in Xcode and then launch the app manually. It seems to crash the first time but on second run seems to work OK. Maybe a little hacky but less manual steps than the other methods. Tested on Xcode 7.
I have only started getting this error.
The application works perfectly when working on the iPhone simulator, and there are now errors like the one above.
The application is being put on a 3.0 iPhone if that is any help.
Have you rebooted? You could try restarting XCode and maybe even power off and back on your iPhone device. If that doesn't work, try rebooting the desktop you're debugging from.
I frequently (well, pretty frequently at least) have weird connectivity issues between XCode and my iPhone and rebooting the phone (power off, back on) will generally solve these.
Check that all paths in your project don't contain '#' simbol.
for example, my project at this path: "/User/alex/Projects/prj_MMH/branches/#19/" causes same error.
I had the same problem. Cleaning the build directory helped.
The answer for me was that it was running with the wrong build configuration. Go to the 'Scheme' at the top of the window, click on the 'App' at the left and Edit Schemas from the menu and select the 'Run Name.App'. Under the Info tab, there is the Build Configuration dropdown. It should be set to 'Debug' - I had it set to 'Ad Hoc Distribution' I think.
The other part which might be needed too, was that under the main project target 'App' in tab Build Settings section Code Signing Identity, the Debug setting should be set to "Don't Code Sign" and the 'Any iOS SDK' set to "iPhone Developer"
Is this in the XCode Debugger console?
You could be running the Release version.
Only the Debug build can pipe stdout/stderr back to XCode.
Created an app for adhoc distribution and installed on iphone but it is not working on the installed iphone,Tried connecting the iphone to mac and debug the app but it throws up error stating
" Error launching remote program: failed to get the task for process
907."
is there a way to debug the adhoc distribution provision file from xcode
No, you can't debug an AdHoc build in XCode--setting get-task-allow to FALSE in your Entitlements.plist basically says "don't allow the debugger to connect to this", and is required for AdHoc and AppStore builds.
See
What does get-task-allow do in Xcode?
or the documentation...
I started having this error in my projects in XCode 4.2, and had a tough time figuring it out with the new project layout.
Make sure you go into the Project Settings and change the Code Signing Identity to a development profile for the Debug setting in the target settings. It's a bit easy to miss because the Project settings come up first, and there are identical looking Code Signing Identity settings there. But Target settings trump Project settings.
If that still doesn't work in XCode 4.2, go to "Edit Schemes" - in the project drop down, which is just to the right of the stop button, in the left segment of that custom pop-up. Select "Run" and make sure Build Configuration is set to "Debug".
In prior versions of XCode, it used to tell you whether you were in debug or release right up front; I haven't found where it's that obvious with the new "Schemes".
Restarting the xcode worked fine for me