Is there any way to reduce Blackberry simulator load time. One way I found was View->Turn Graphics Acceleration->off . We have to close the simulator every time we make a change in code. Is there any way to bypass this closing and restarting problem of BB simulators?
The solution is to use a newer SDK (e.g. version 7) for development which does not require restarting the simulator every time while debugging. Then when you are ready just compile it to a target platform -- you can even do that from command line, of course always test it on the device before deployment.
Related
I am having issues when building any app with an iPhone 11 Pro or iPad Pro as the physical device destination. A new instance of a standard template app with Hello World takes moments to build and install on the phone, but then the app freezes on a black screen. Console reports the following.
warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the on-disk shared cache for this device. This will likely reduce debugging performance.
Interestingly, if I stop the build in Xcode, which quits the app on the device, then manually launch the app on the device, everything works as expected but no logging of course. Reverting back to Xcode 13.4, the same issue occurs suggesting its an iOS 16 beta issue?
Further testing suggests this is an issue with the debugger. If I allow Xcode to build and run an app to one of my devices, it will launch and then freeze on a black screen. After a few minutes the app progresses to its main ContentView and the console appears to then function as normal.
Any thoughts? Thanks.
To those who bump into this later (or future-me) - I had the same issue.
Entirely removing the Device Support folder and re-opening Xcode forces it to recreate the device support files.
tl;dr
rm -r ~/Library/Developer/Xcode/iOS\ DeviceSupport
And then re-open Xcode.
More context:
lldb uses the gdb-remote protocol for reading memory from a device. This has the benefit of being a widely supported protocol, but it is not blazingly fast. So lldb will work much better if it has copies of the binaries that get loaded into your program on the local host where it can inspect them directly.
Xcode is the one that makes that happen. When you plug in a device and start up Xcode, if the OS is one Xcode hasn't seen before, it copies the system binaries over in one gulp and puts them in ~/Library/Developer/Xcode/{DeviceType} DeviceSupport/SystemVersion. If this process fails for some reason, then lldb will have to fall back to reading symbol information from the device, which is slow - that's what the warning is warning about.
If you delete the current version of the DeviceSupport directory, the next time you try to debug, Xcode will copy the binaries over again. If the error you had was transitory, then that should fix the problem. If not, it would be good to file a report with Apple Feedback to figure out what's actually going wrong.
Just open Xcode, it will ask you to install some required additional components. That's it.
It happens after updating Xcode or Mac OS.
Updating xcode then reopening it did it for me.
Merging the current top-voted answer and the steps in the other question's solution worked for me only:
rm -r ~/Library/Developer/Xcode/iOS\ DeviceSupport
Open the Xcode project/workspace with your device connected
Wait until the “Fetching debug symbols” process finished
Close the Xcode
Reopen the Xcode again and try to Build and Run on your device
You are using Connect via Network. Uncheck it and use a Cable. Looks like some recent Issue in iOS 16
I had this issue while using flutter and iPhone. I fixed it by just running flutter clean and then flutter pub get in the terminal and worked. Incase any are having the issue while using flutter.
If you are using 2 xcode apps try deleting 1 old one might fix it
I am using Xcode 13 on a Macbook Pro (Intel/2019) with macOS Big Sur 11.6
I am building and launching the app on a connecting iPhone X running iOS 15.0, I am also running a UI test suite based on XCUITest while I do that.
The app takes extremely long to launch (2+ minutes), then it sits on the splash screen for another 2-3 minutes. Meanwhile, Xcode shows the alert attached:
I have 2 questions:
Is this a widespread Xcode 13 / iOS 15 issue?
What does the message in the alert mean: "LLDB is likely reading from device memory to resolve symbols"? Is there anything I can do to reduce or avoid this wait?
Once your debug session is running, pause your app (or hit a breakpoint) and in the Debugger Console window, and do image list. This will list every binary / dylib / framework in the process, there will be as many as five hundred these days.
After the filename, if you see a hex address, then lldb has had to read all of the libraries out of memory on device startup. Xcode expands a local copy of all your device libraries on the Mac so lldb can find them there, instead of reading them from memory.
If you look in ~/Libraries/Developer/Xcode, there's a iOS DeviceSupport directory. You can remove it, re-launch Xcode and it will re-expand the libraries for your iOS etc devices as they're plugged in.
For those that are not familiar with the command line, go into your terminal and you can do this command.
rm -r ~/Library/Developer/Xcode/iOS\ DeviceSupport
This will recursively delete everything in the file tree in the 'iOS DeviceSupport' folder.
The steps are
Disconnect your device
Quit Xcode
Open a terminal window and run the above command.
Open Xcode
plug in your device and run your app.
The first time that you run the app will take a while as your computer re-obtains the information that you deleted, but subsequent runs of the app should work much faster.
That is what worked for me.
I start out with the "-cal" scheme running just like the Calabash setup guide tells me to. Then I run cucumber for Calabash-iOS. The simulator seems to stop and restart before executing the tests in a different (possibly cached version) of my app and the target device has changed from an iPhone 6 to running the tests in an iPhone 5s.
How can I make cucumber execute the tests in the already running "-cal" scheme? Or (better yet) how can I make it relaunch using the "-cal" scheme? I can see cases where relaunching would be valuable.
Below is the only code executed before the scenarios run. I know it says .relaunch is in there, but if I take it out then the test fails on the first step.
Before do |scenario|
#calabash_launcher = Calabash::Cucumber::Launcher.new
unless #calabash_launcher.calabash_no_launch?
#calabash_launcher.relaunch
#calabash_launcher.calabash_notify(self)
end
end
So there are few questions there.
How can I make cucumber execute the tests in the already running "-cal" scheme?
Answer: When you build the cal target you define what target to build for and when you execute the tests you define what target to execute on.
Build: -sdk iphonesimulator9.0
Execute: DEVICE_TARGET='iPhone 6 Plus (9.0)'
The simulator seems to stop and restart before executing the tests in a different (possibly cached version) of my app and the target device has changed from an iPhone 6 to running the tests in an iPhone 5s.
Answer: Also related partly to question 1 (defining target to control what setup you test on). Besides that the app will relaunch between scenarios otherwise each scenario would be dependent on what ever else had been executed before it.
The one thing you can toggle is if the app should be reinstalled between scenarios. This is helpful if you have some functionality that only shows/executes on first install/launch. To add support for reinstall you can add something like this to the launch.rb file in "Before do |scenario|"
if scenario_tags.include?('#reinstall')
#calabash_launcher.reset_app_sandbox end
The simulator seems to stop and restart before executing the tests
The simulator is quit and relaunched before each Scenario for stability. If we keep the simulator open, it quickly becomes unstable. See below for more details.
(possibly cached version) of my app
This is no longer an issue starting in run-loop 1.5* which is required by Calabash 0.16.4. What version of Calabash are you running? If you are building from the command line and from Xcode, have a look at this project Calabash iOS Smoke Test and specifically this script that stages products built by Xcode to the same directory as the command line builds.
iPhone 6 to running the tests in an iPhone 5s.
Starting in Xcode 7.1, the default simulator is the iPhone 6. Pre Xcode 7.1, the default simulator has been the iPhone 5s. Lasse is correct, use the DEVICE_TARGET to control which simulator to run on.
How can I make cucumber execute the tests in the already running "-cal" scheme? Or (better yet) how can I make it relaunch using the "-cal" scheme?
You don't have to relaunch between Scenarios. Relaunching will restart the simulator. If you don't want to relaunch, you can use a custom calabash backdoor to reset your app to a good known state before each test start. I used to do this all the time; it really speeds up the testing. However, I abandoned this approach because it is hard to maintain and as I mentioned, the simulator becomes unstable.
Or (better yet) how can I make it relaunch using the "-cal" scheme?
This I actually don't understand. Have you set the APP variable? Is another app launching? Did you run calabash setup and does your app have a Watch extension? If so, you are probably running into this problem: calabash setup adds calabash.framework to Watch extension instead of the app
I have a large iOS project with a complex custom build script written in Jam.
The app is compiled through a Run Script build phase.
When I run the app on a device from XCode the performance tray with the fps counter under the Debug Navigator doesn't show up.
For a simple XCode OpenGL|ES sample application the performance tray shows up fine.
Is there anything I can check/do to get the integrated OpenGL|ES performance tools to work properly?
The answer it turns out is going to Product->Scheme->Edit Scheme and in the Options tab changing OpenGL ES Frame Capture from Automatically Enabled to Enabled.
I am using 5.0 BB JDE.
Is there any way around to see your code changes without restarting BB simulator every time. Or any way to see your changes in less time.
Right now i have to restart my project every time.
Looks like there is no other option than to restart simulator.
I use JDE + Eclipse and my usual workflow is:
Make code changes in Eclipse.
Build with JDE (add new files if any).
Restart the simulator (simulator that is bundled with JDE loads new .cod automatically on restart, for other simulator I have to manually upload new .cod after restart).
I don't run the project from JDE since it takes too long to attach debugger, while actually I need debugger very rarely.
There isn't any need to restart your simulator just run your project after applying the changes.It load new .cod automatically.