Here is my problem :
When I'm testing my App using Xcode, my app freeze (and Xcode too) for a long time after displaying the Launch Image.
But when testing my app without Xcode, it runs normally.
I've noticed something : in the console of my device (Organizer / Devices / MyDevice / Console), when I launch the app from Xcode, some strange logs are displayed :
<Error>: Max open files: 125
is written like 20 times
and also :
<Warning>: CoreAnimation: updates deferred for too long
<Warning>: CoreAnimation: timed out fence 1954b
<Warning>: CoreAnimation: failed to receive fence reply: 10004003
It still stuck on those 3 last lines for a while, and then carry on the execution.
What is happening?
When you run app with XCode, debugger (LLVM or GDB) is attached. Debugger definitely cosumes a lot CPU and memory resource. So it may delay threads starting by the apps. Futhermore debugger may open some extra files, resulting in the log telling you that you used up 25 files.
Related
I have a problem with debugging any app using Xcode 11.3.1.
The app builds very quickly (about 3 seconds), but after that, the device displays a white blank screen for a minute or two. On the Report navigator tab, it says that the app is running and debug is already in process but there are no logs. It happens with any app, even a newly created one.
Tried reproducing it on iPhone XS and iPhone 11 pro with 13.3.1 iOS version (the latest one at the moment) - the result is the same.
After this pause, I can debug the app as nothing happened. This behavior happens only during the debug session (no matter using cable or WiFi). If an app was already installed and launched directly from the phone - everything is fine.
I have updated IOS on device to 12.0.1 and XCode to version 10. I am able to build the app, deploy to simulator on mac with IOS 12 but when I deploy the app to the device it starts, shows a splash screen and quits. The icon stays but the app will always fall after start.
I tried debuging but it doesn't even get to any of the constructors of Main or App in Native or PCL code.
I don't even know what to try next. All information I have is:
Launch failed. The app 'Tempick.iOS' could not be launched on 'iPhone (Yuriy)'. Error: error MT1007: Failed to launch the application '/Users/yzolotarev/Library/Caches/Xamarin/mtbs/builds/Tempick.iOS/896e108cc5f36e1ca3def01022a148c7/bin/iPhone/Debug/Tempick.iOS.app' on the device 'iPhone (Yuriy)': Specified cast is not valid.. You can still launch the application manually by tapping on it.. Please check the logs for more details.
All I could find on the web was restart XCode, restart device, delete app, restart MAC. All of that I tried and it doesn't work.
I am experiencing this for all apps I have. I have a feeling its something to do with the provisioning profile/certificate that doesn't get recognised after the update of the IOS on the divice. Has anyone come across a similar problem?
UPDATE
I was able to trace the device log which reads the following:
Time Device Name Type PID Tag Message
Oct 23 17:37:23 iPhone-Yuriy Error 52 SpringBoard(AssertionServices) [com.maddyz.Tempick] Bootstrap failed with error: <NSError: 0x282837d80; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Failed to start job">
______
Time Device Name Type PID Tag Message
Oct 23 17:37:23 iPhone-Yuriy Error 52 SpringBoard(FrontBoard) Bootstrapping failed for <FBApplicationProcess: 0x10a7dda10; com.maddyz.Tempick; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID com.maddyz.Tempick" UserInfo={NSLocalizedDescription=Unable to bootstrap process with bundleID com.maddyz.Tempick, BKSProcessExitReason=0, NSLocalizedFailureReason=Failed to start job, NSUnderlyingError=0x282836e20 {Error Domain=NSPOSIXErrorDomain Code=3 "No such process" UserInfo={BKLaunchdOperation=launch_get_running_pid_4SB, NSLocalizedDescription=Unable to get pid for label UIKitApplication:com.maddyz.Tempick[0x482d][62], BKLaunchdJobLabel=UIKitApplication:com.maddyz.Tempick[0x482d][62], NSLocalizedFailureReason=No such process}}, BKSProcessJobLabel=UIKitApplication:com.maddyz.Tempick[0x482d][62], BSErrorCodeDescription=bootstrap-failed}
After I have tried numerous approaches I finally found a device log notice that printed this:
Time Device Name Type PID Tag Message
Oct 24 12:50:41 iPhone-Yuriy Notice 0 kernel(AppleMobileFileIntegrity) AMFI: '/private/var/containers/Bundle/Application/4D4359E4-8947-425E-95B4-82AC4D910449/IOS12Test.iOS.app/IOS12Test.iOS' does not pass CT evaluation, result: 0x80008
Oct 24 12:50:41 iPhone-Yuriy Notice 0 kernel(AppleMobileFileIntegrity) AMFI: '/private/var/containers/Bundle/Application/4D4359E4-8947-425E-95B4-82AC4D910449/IOS12Test.iOS.app/IOS12Test.iOS': Unrecoverable CT signature issue, bailing out.
After googling this a little I came across another stack message
iOS app won't run on device any more under iOS 12: Unrecoverable CT signature issue
After changing permissions to Apple Worldwide Developer Relations Certification Authority to Use System Defaults I was able to start the demo app.
I'm still learning how to work with Xamarin.iOS myself but I ran into the same problem. It has to do with the linker. Open the iOS project properties and under iOS Build change Linker Behavior to Don't Link. This should let you debug on a physical device but the app size will be too big to be able to deploy to the app store.
I don't know if this will apply to you but I also had to downgrade my project's Entity Framework Core packages to 2.0.3. I read elsewhere that other people were having issues with later versions.
On Windows Xamarin.Forms isn't available for Debug from the Device it self. Even the "Xamarin Live Player" has expired for iOS. You should connect to a MAC so you can make the Build for your project. Even some other Frameworks like PhoneGap aren't available for iOS anymore.
As always Apple taking all for themselves.
I'm using Xcode 8.1, Swift 3.
I'm making a custom watch face for the Apple Watch (For myself).
So i set the watch to always show last app on wake, and after sometime i noticed that it get back to the default watch and my app is closed.
For a week now I'm trying to figure out why the app keep closing.
On Xcode i tried to debug the WatchKit Extension and after some time the console just print: "Program ended with exit code: 0" and the app closed again.
I looked on google to check if WatchOs have timeout for apps and didn't find out anything about it.
Also the app is sometimes closed after 5 min and sometimes after 12 h...
The app is never pass the 1.5MB memory.
Any idea what could possibly cause that?
I faced the same issue while working on an app.
In my case I'm using SpriteKit scenes which take a lot of memory for rendering to it causes the crashing of the app on watch.
Do check the memory consumption of your app. Make it under the bar to test it on the device.
Try to remove the elements which you think of taking a lot of memory. Use Instruments to track them.
NOTE: It will run successfully on Simulator. But on the real apple watch it crashes.
App will quit after 8 minutes if it is not in the dock, this is explained in WWDC16 videos, other bug might be similar to this:
Watch App terminates upon deactivation if WKAlert is being shown
So I upgraded to Xcode 7.3.1 and now my Xcode will build, and deploy my apps (yes every app, even a brand new blank one) to the simulator but the app never launches on the simulator and the debugger never attaches, Xcode just hangs and has to be force quit. I've completely wiped out Xcode and all simulators and re-installed to no avail. I've scoured Stack Overflow and Google trying every piece of advice and still no luck. Anyone anywhere have any idea how to solve this issue? If I downgrade to 7.2.1 I'm able to debug in the simulator just fine.
Let me know if you need more information.
My Apps run just fine on the simulator, and if I try to attach the debugger to a running app it wont and Xcode hangs in the attempt, when attempting to attach this way at least Xcode doesn't have to be force quit.
FYI, I can debug on a device this is only a simulator issue.
I had this same issue, and tried fixing my projects and reinstalled Xcode twice before I was able to get Simulator to crash and give me an error report that called out Cylance. Luckily I have access to administer our Cylance portal, so I was able to work through the issue to narrow down the problem.
Symptoms:
When running an app from Xcode, the Simulator launches but the application does not launch within the Simulator
Trying to stop the application from within Xcode does not work, and generates no messages
Trying to re-run the application from within Xcode generates the following message: ‘An instance of “APPLICATION NAME” is already running. Choose “Stop” to terminate and launch a new instance.’ But pressing Stop does nothing.
Xcode will not quit, and eventually the user must Force Quit to exit Xcode
Within the OS X console, the following messages are displayed:
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] main process is a platform binary, but mapped executable file is not: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] mapped file has team identifier XXXX: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
Resolution:
The problem is caused by Memory Protection being turned on within the policy assigned to the Mac within the Cylance portal.
To resolve the issue, place the Mac into a zone/policy that does not have Memory Protection turned on. Auto Quarantine and Protection Settings can be left on.
During my testing, I was not able to come up with a list of exclusions that allowed me to leave Memory Protection on, so I ended up disabling it completely.
When I run the simctl launch command to launch an app in iOS Simulator, the app may or may not come up, depending on how long it takes for the iOS Simulator to get its act together. The following observations lead me to believe that there is some sort of a timeout involved, but it's not apparent from the limited simctl documentation what that timeout is and how to control it.
When launching the app, it may not launch (iOS Simulator comes to the home screen) if the app is not up in anywhere from 35-90 seconds. However, if the app manages to launch in under 20 seconds, it always comes up.
If first launch fails, same app, same machine, same command will usually succeed on 2nd or 3rd attempt as whatever needs to 'warm up' does so.
I am guessing the timeout is probably 30 seconds. How can I set it to a larger value?
Update:
Here's our exact sequence of events:
If device is shut down, boot it (simctl boot ...) and wait for status to change to Booted in simctl list
Uninstall app (simctl uninstall ...)
Install app (simctl install ...)
Shut down the device (simctl shutdown ...) and wait till it has shut down
Start iOS Simulator (open -a "<path to simulator> --args -CurrentDeviceUDID <device id>)
Wait for device to reach status Booted
Launch app (simctl launch ...)
It is this last step that doesn't always succeed. There is no error, the app just doesn't come up.
There is no way to configure the timeout to be higher than 30s. 30s is already extremely high for the issue we have the timeout for (waiting for the system app to checkin). Assuming the device is already booted, that should not be an issue.
Update:
Based on the updated question, it is now clear that the device is being booted via 'simctl boot' rather than with the iOS Simulator. Currently, if you boot a device from the command line, it is only available for NonUI work (eg: unit tests) because the device is configured to not have a head attached to it. If you try to launch an app in this state, you will get an error because the system app is unavailable to respond to the launch request. I suspect you may instead want to do something like I describe in my answer to Xcode 6 - Launch simulator from command line
open -a "iOS Simulator" --args -CurrentDeviceUDID <DEVICE UDID>
simctl install ...
simctl launch ...
In other words, start at step 5.
If the iOS Simulator is already running, you have to switch to another device from the iOS Simulator GUI (or kill the process and relaunch it with the command line argument as above).
If the issue happens in the absence of using 'simctl boot', please update.
We had those issues exactly until we've upgraded hardware to device with SSD drive. Similarly to iPhoto... the iOS Simulator ceised to be usable on computers with classical hard drives. This seems like one of ways, how to force developers buy new hardware even though the old one would still work well.