I recently purchased an Apple developer's license so I can make apps using Swift
However, whenever I build my app, it takes about five minutes to load, and opens up the iOS simulator which is extremely slow.
How can I build just the app itself?
Thanks.
I had the same problem, and the solution is quite simple.
Don't close the iOS simulator, leave it open.
Just stop the app from running, and it will close the app within the simulator itself.
CommandR to run the app, Command. to close.
You did a "Build & Run" with an iOS Simulator device selected as a run destination.
Select a real iOS device in the run destinations list and B&R to it instead (or just Build rather than B&R).
Just press cmd+B to build without running simula.
Related
I'm creating a flutter plugin and I just tried the example project that gets created by flutter it self. This example project is an app that shows the operation system and its version. If I start it from Xcode on my iPhone SE, it works fine.
But if I close the app and open it without Xcode, that means that I tipp on the app icon to launche it, like every normal app, it doesn't start correctly.
It is showing for not even a second a white screen, followed by a black screen and is closing the app right after this.
Why is it behaving like that?
Is it, because it is a debug version and needs Xcode?
How can I put my example app on my iPhone without needing a connection to Xcode to start it?
Thanks in advance!
Edit: Thanks to the answer of Răzvan Puiu below, i know now that this is because xCode puts the app as a debug version on my iPhone. This debug version can only run with xCode. After I tried it with a 'normal' app and not the example app of a plugin project, i even got this text shown if i tried to start the debug version without xCode:
So the solution is to run the app with:
flutter run --release
I believe it behaves like that because you don't have an Apple developer account. "Without enrolling in the Apple Developer Program, your app will only last for 7 days on your device. After that, you’ll have to re-deploy it to your device via Xcode. If you’re enrolled in the Apple Developer Program, you won’t have this inconvenience."
Yes
You can run flutter run --release and then select your physical device. However the app will remain on your phone for only 7 days unless you have the Apple dev account.
I've been developing a news app with Flutter and when I build and run it through Android Studio it launches fine, but when I try to launch the app by clicking on it on the home screen, it says "in iOS 14+, debug mode flutter apps can only be launched from Flutter tooling,IDEs ....."(Screenshot attatched). Can someone tell me as to how to get around this?
Apparently, this is a known issue of Flutter on iOS 14 for apps in debug mode, see this article on the Flutter website, and this GitHub issue. So for the time being, I believe your main workarounds are the following:
Always run the app from the host PC (using flutter run, IDE debug, etc.)
Build a release version of your app (instead of debug) and use that on your device, e.g. use flutter run --release
Use a device with iOS 13 or older
Use a simulator
If you want to use the app without being connected via usb
Open the ios folder on Xcode
Make sure your device is connected
Select Product from the menu bar -> Scheme -> Edit Scheme
Or simply use the shortcut: command + >
Step 3
Change the build configure to Release
Run the app from Xcode
Disconnect your device and you're good to go!
I have a published iOS app and am trying to add a WatchKit extension for it.
For now, all I have is a watch interface.storyboard with a single label just to verify the entire building process. The app runs fine on the simulator (iPhone 6 (8.3)) and the Watch simulator.
When I run it on the iPhone and Apple Watch, it runs on the iPhone, installs on the Apple Watch, but then just displays a wait status when trying to run it on the Apple Watch.
The error in Xcode says "Waiting to attach", and when I try to attach it via Xcode > Debug > Attach to Process, it says "Lost connection to iPhone".
I am using Xcode 6.3.1.
The Waiting to attach message is bothering many people. Here are a few things that you can do:
Build the main iPhone app first, then stop it and build the WatchKit app
Wait some time for the attachment to finish (it can take 20 seconds or so)
I found that tapping the app icon on the Apple Watch sometimes helps to re-establish a lost connection. After tapping the app icon, the app often starts to update. So tap on your Apple Watch app after the message Waiting to attachappears.
If waiting does not help, stop all processes (make sure that the stop button in Xcode becomes gray) and then build and run your code again
Sometimes, restarting Xcode helps to solve problems
Force-quit your app on the Apple Watch as explained here
If that still does not help, deinstall and reinstall your WatchKit extension using the Apple Watchapp on your iPhone
Other things you could try:
Clean your project
Uninstall and re-install your watch app using the Apple Watchapp on your iPhone
Delete your iPhone app from the device
Delete/recreate the target scheme
In the WatchKit app target settings, set "Skip Install" to NO
I discovered that my WatchKit Bundle Names in my info.plist were not consistent. Ensure that the prefixes are exactly correct.
It was really never working for me.
I was able to fix it to remove any specific architectures in the build settings of the app target and leave it to Automatic (remove ARCHS = ... in project file)
Restarting the watch solved this for me.
Press and Hold the side button until you see the Power Off Slider.
Drag the slider to turn off your device completely. (Note it is NOT a button to press)
After you turn off your Apple Watch, press and hold the side button again until you see the Apple logo.
From this Apple Support Page: https://support.apple.com/en-gb/HT204510
I was developing a findersync extension for Mac and faced similar issue with XCode 7.2.1 and i found my changing bundle identifier of the extension project, it fixes the issue. I know this is not a permanent solution but atleast it will help you keep going forward if nothing else works
I have the same issue I have already two watch apps in the App Store but the current project with only some Interface objects runs fine in simulator but not on the watch I get only the waiting symbol and then it switch back to the apps screen on the watch.
I found the issue it was a setting of the Build architecture in the build setting. I used Xcode automatic problem solver to change the old project.
Now it works fine.
Is it possible to have Xcode automatically launch an app on my iOS device from Xcode 4.6 without attaching its debugger to the app? I'm working on an automated build system, so manually launching the app is not an option.
I've found Run Without Building under the Product -> Perform Action menu, but that still attaches the debugger. I can edit the scheme to make Xcode wait until the app is launched manually before attaching the debugger, but that's basically the opposite of what I want.
If you want to launch an app from Xcode without launching the debugger, I would uncheck the “Debug executable” option in the Xcode scheme:
If you want to launch an app manually, you can:
Select your device in the "scheme" dropdown;
Build the app (don't run);
Open the organizer and go to the "devices" tab;
Drag your app from the "Products" folder in the main Xcode project navigator to the device in the organizer window and it will be installed; and
You can then run the app manually from the device at that point.
This process can be useful when diagnosing startup performance and you want to run the app on the device completely separate from Xcode (and the debugger, if you have a debug build).
xcode 6.3.1
unselect the debug execute, then you could run without debugging.
Just Build and run and once it launches press stop and open the app manually. It will then be the app you built but not connected.
xCode 4.5 will occasionally hang when building and running when the app under development is running in the simulator. The anticipated response is the app running in the simulator will stop and the new build will be started in the simulator. This state will not allow xCode to stop tasks or close/quit. xCode responds that there are tasks in process and will not stop these tasks. Is there a preferable solution other than force quitting xCode?
Actually quitting the simulator 99% of the time solves the issue.
Right click on simulator icon --> Quit
And Xcode will build the new version and launch it in the simulator
In some cases quitting the simulator does not help, then you should do iOS Simulator->Reset Content and Settings... this will kill all applications on your simulator, but sometimes it is very useful though.
xCode will not allow a quit action because tasks are running and will not stop or build in current state.
Ignore xCode state
Change simulator type in xCode's device scheme
Build/run app in the new simulator, this may cause the developer's app to crash in the simulator.
Change device scheme back to original selection.
Build/run app