Xcode can't install application - ios

I'm running Xcode 11.2.1 and all of a sudden started getting the error Unable to install "my app name". The app builds fine and I was able to install it to the same phone not 20 minutes ago and I haven't made any code changes since then.
Here's a screenshot of the error:
So far I have tried uninstalling the existing app on the phone, restarting the phone, restarting xcode, restarting the computer, clearing derived data, disconnecting and reconnecting the phone many times. Nothing has worked, still getting the same error.
Xcode provides no additional errors other than the one shown.
Has anyone else faced something similar / knows a potential fix?
Update: Okay so xcode does provide some insight, If I click the details button shown in the screenshot I can see the following info:
App installation failed
Domain: com.apple.dtdevicekit
Code: -402620388
Failure Reason: No code signature found.
User Info: {
DVTRadarComponentKey = 487927;
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000011d62f6e7 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x000000011d62fde9 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x000000011d66f56a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164
3 DVTFoundation 0x0000000103ccd156 DVTInvokeWithStrongOwnership + 73
4 DTDeviceKitBase 0x000000011d66f301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
5 IDEiOSSupportCore 0x000000011d4f7a25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
6 DVTFoundation 0x0000000103dfe3ba __DVT_CALLING_CLIENT_BLOCK__ + 7
7 DVTFoundation 0x0000000103dffa92 __DVTDispatchAsync_block_invoke + 809
8 libdispatch.dylib 0x00007fff665c4553 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00007fff665c54de _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007fff665caa9e _dispatch_lane_serial_drain + 597
11 libdispatch.dylib 0x00007fff665cb422 _dispatch_lane_invoke + 363
12 libdispatch.dylib 0x00007fff665d4aa1 _dispatch_workloop_worker_thread + 598
13 libsystem_pthread.dylib 0x00007fff6681e763 _pthread_wqthread + 290
14 libsystem_pthread.dylib 0x00007fff6681e5c3 start_wqthread + 15
);
}
Seems to be a code signing issue, though I don't know why my code signature would've changed...

Okay, so after trying to run to a simulator, Xcode gave me a build time error stating that one of the frameworks I was using wasn't built for the correct architecture... This is because the framework was built for phone architecture not simulator. So I rebuilt the framework, this time for phone and for simulator, and voila it built and installed to the simulator no problem!
I then tried to run it to the phone again and it installed without issue!
So I guess somehow the signature on that framework or something must've been invalid, and rebuilding it fixed the issue.
Not sure if this will help anyone else but I'll leave the answer here just in case.

Hope this will save somebody's life.
You just need to turn on the checkbox in the image - "Code Sign On Copy".

Some time happens to me that Xcode lose the team signature. Go to target settings, Signing & Capabilities ->Team. May be you have a screen, like this:
Click on Team combo box e add you account. That's all
Hope this help.

Related

iOS React Native app runs perfectly in testing but crashes in release build

I wrote a simple app with React Native targeting iOS. When I build the app in Xcode to test on simulators or my iPhone everything works perfectly. When I archive the build in Xcode and load it on my iPhone using the development option, it crashes when I press the only button on screen on start.
The app source code can be found on GitHub.
I am using React Native ~0.63.4 and React: 16.13.1 in a bare Expo workflow.
Third party dependencies:
#react-native-async-storage/async-storage
expo-constants
expo-notifications
uuid
react-native-date-picker
Here is a full crash report from the device logs: Google Drive
I'm at a loss trying to interpret the crash logs but the thread that crashes is exactly this everytime (except for the thread number):
Thread 3 name: Dispatch queue: com.facebook.react.ExceptionsManagerQueue
Thread 3 Crashed:
0 libsystem_kernel.dylib 0x00000001d285f414 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001eed77b40 pthread_kill + 272
2 libsystem_c.dylib 0x00000001aec84b74 abort + 104
3 libc++abi.dylib 0x00000001b9fbccf8 __cxxabiv1::__aligned_malloc_with_fallback+ 81144 (unsigned long) + 0
4 libc++abi.dylib 0x00000001b9fade4c demangling_unexpected_handler+ 20044 () + 0
5 libobjc.A.dylib 0x00000001b9eb6f64 _objc_terminate+ 28516 () + 144
6 libc++abi.dylib 0x00000001b9fbc0e0 std::__terminate(void (*)+ 78048 ()) + 20
7 libc++abi.dylib 0x00000001b9fbc06c std::terminate+ 77932 () + 44
8 libdispatch.dylib 0x00000001a5554dc4 _dispatch_client_callout + 40
9 libdispatch.dylib 0x00000001a555c10c _dispatch_lane_serial_drain + 580
10 libdispatch.dylib 0x00000001a555cc5c _dispatch_lane_invoke + 408
11 libdispatch.dylib 0x00000001a5566d78 _dispatch_workloop_worker_thread + 708
12 libsystem_pthread.dylib 0x00000001eed78804 _pthread_wqthread + 276
13 libsystem_pthread.dylib 0x00000001eed7f75c start_wqthread + 8
When I open the app while connected to my laptop and have the console for my iPhone open while crashing the app, I first get these messages under Errors and Faults:
error 16:14:06.383233-0500 remindrs Error: Requiring unknown module "undefined".
error 16:14:06.386759-0500 remindrs Unhandled JS Exception: Error: Requiring unknown module "undefined".
error 16:14:06.463315-0500 SpringBoard Ignoring state for untracked process [application<org.name.remindrs>:5966]: <RBSProcessState| task:none debug:none>
fault 16:14:06.559231-0500 SpringBoard Unable to move topic <private>, This topic was not in the list provided! APSTopicListOpportunistic
I've tried cleaning the build folder, turning off Swift compiler optimizations, and rearchived the project multiple times.
None of my searching has paid off and I'm not sure how to identify the issue I am having. I don't know if it is with React Native or with some configuration in Xcode.
Thank you for your help!
I solved the problem by removing a few lines of codes dealing with a Date. I'm not sure why this caused a crash in release and not debug but the problem is fixed!

Missing dSYM for UIKitCore, CoreFoundation, etc

I am trying to symbolicate an iOS crash report. I am missing dSYMs for UIKitCore and other native libs.
The app is built with NativeScript. I have successfully symbolicated frames of my app and NativeScript framework. However I can't seem to find a way to symbolicate frames of libs like UIKitCore, they are still showing up as addresses. I have also tried searching for them using mdfind as per Apple documentation - they are not present on my Mac. I have also tried looking for these dSYMs online without luck.
Here is an excerpt of my crash log:
Last Exception Backtrace:
0 CoreFoundation 0x1cb5d927c 0x1cb4c1000 + 1147516
1 libobjc.A.dylib 0x1ca7b39f8 0x1ca7ae000 + 23032
2 NativeScript 0x10420fca0 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool) + 277664 (JSErrors.mm:189)
3 NativeScript 0x104223354 NativeScript::FFICallback<NativeScript::ObjCBlockCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*) + 357204 (FFICallbackInlines.h:33)
4 NativeScript 0x104cb9894 ffi_closure_SYSV_inner + 11458708 (ffi.c:1218)
5 NativeScript 0x104cbc1b4 .Ldo_closure + 19
6 libdispatch.dylib 0x1cb018a38 0x1cafb9000 + 391736
7 libdispatch.dylib 0x1cb0197d4 0x1cafb9000 + 395220
8 libdispatch.dylib 0x1caff99e4 0x1cafb9000 + 264676
9 CoreFoundation 0x1cb56ac1c 0x1cb4c1000 + 695324
10 CoreFoundation 0x1cb565b54 0x1cb4c1000 + 674644
11 CoreFoundation 0x1cb5650b0 0x1cb4c1000 + 671920
12 GraphicsServices 0x1cd76579c 0x1cd75b000 + 42908
13 UIKitCore 0x1f7edf978 0x1f7623000 + 9161080
14 NativeScript 0x104cbc044 ffi_call_SYSV + 67
15 NativeScript 0x104cb8fb4 ffi_call_int + 11456436 (ffi.c:758)
16 NativeScript 0x104cb8ab0 ffi_call + 11455152 (ffi.c:767)
17 NativeScript 0x1041d4f90 NativeScript::FunctionWrapper::call(JSC::ExecState*) + 36752 (FunctionWrapper.mm:97)
18 NativeScript 0x104cb7b58 llint_entry + 32567
Many articles I found had examples with UIKitCore symbolicated so I assume this has to do with my configuration.
Part 1: Install the symbols
Check the full iOS version in the crash report. It should look like "iPhone OS 13.3 (17C54)"
There are a lot of repositories with iOS symbols or links to them. Like this one: https://github.com/Zuikyo/iOS-System-Symbols/blob/master/collected-symbol-files.md
Find and download symbols you need.
Unpack them to ~/Library/Developer/Xcode/iOS\ DeviceSupport
Add info.plist into the root folder if it missed (just copy from the other symbols and change its version value)
Part 2. Use the force of Xcode
Connect ANY real device, open Xcode, open the "Devices and Simulators" window, click the "View device logs" and then go to tab "All logs".
Drag and drop the crash into the table. Find it.
If the system symbols are not desymbolicated – do right-click on the crash and select "Re-symbolicate crash".
Repeat Step 3 multiple times (2-3 usually enough) – it needs time to resymbolicate it, but it looks like xcode does not update the crashlog automatically
And yes, UIKitCore is a system framework
UIKitCore is NOT an apple framework.

Xcode 9 running app on iOS 10.1.1 crashes on launch

I developed an app targeting iOS 10.0+ but tested only on devices & simulators running iOS 11.0+.
I hooked up an iPhone 6 running iOS 10.1.1, hit Run and the app crashes on launch with no error logged in the console, just crashes on AppDelegate.
A discovery I made, is when I went to my storyboard and made a totally empty ViewController as the Initial ViewController, the app runs perfectly.
I have set other screens I have developed as the Initial ViewController, some crash and some don't.
I don't see any difference among those screens at all (not in the VCs settings or the classes).
What could be the issue? I am totally frustrated :(
Edit: I have tried the following things: Delete & Reinstall the app, Clean CMD+Shift+K & Run, delete the Xcode's Derived Data. None of it worked.
Edit 2: I have downloaded a 10.1 simulator and I am getting this error in the log:
[] __nwlog_err_simulate_crash_libsystem libsystem simulate crash unavailable "libsystem_network.dylib: nw_host_stats_add_src :: received error for SRC_ADDED: [22] Invalid argument"
2017-10-25 16:39:22.478543 Tuttnauer Wi-Fi Connect[40460:11666750] [] nw_host_stats_add_src received error for SRC_ADDED: [22] Invalid argument, dumping backtrace:
[x86_64] libnetcore-856.20.4
0 libsystem_network.dylib 0x0000000104eeb682 __nw_create_backtrace_string + 123
1 libsystem_network.dylib 0x0000000104f02306 nw_get_host_stats + 1083
2 libnetwork.dylib 0x000000010669578b nw_endpoint_resolver_start_next_child + 1382
3 libdispatch.dylib 0x0000000104c68980 _dispatch_call_block_and_release + 12
4 libdispatch.dylib 0x0000000104c920cd _dispatch_client_callout + 8
5 libdispatch.dylib 0x0000000104c6fe6b _dispatch_queue_serial_drain + 236
6 libdispatch.dylib 0x0000000104c70b9f _dispatch_queue_invoke + 1073
7 libdispatch.dylib 0x0000000104c733b7 _dispatch_root_queue_drain + 720
8 libdispatch.dylib 0x0000000104c7308b _dispatch_worker_thread3 + 123
9 libsystem_pthread.dylib 0x00000001050451ca _pthread_wqthread + 1387
10 libsystem_pthread.dylib 0x0000000105044c4d start_wqthread + 13
In my case, the ViewController in Interface Builder has Builds for set for 11.0. Changing it to Deployment Target fixes the issue.
reference from https://forums.developer.apple.com/thread/48959
One of methods how to resolve that is:
Close Xcode
Go to: /Users/YourOSXUserName/Library/Developer/Xcode/DerivedData
Delete all folders from "Driver Data"
Open Xcode, open project and build again.
it's work for me, but I don't know why.
I met the same issue because the custom class for he nib file isn't correct.
Show Identify Inspector -> Class
set it to your customized class.

+[UIPasteboard _accessibilityUseQuickSpeakPasteBoard]: unrecognized selector sent to class

I asked this question on Apple Dev forum, but still didn't get an answer.
We expirience 100% iOS 8 devices crash:
+[UIPasteboard _accessibilityUseQuickSpeakPasteBoard]: unrecognized selector sent to class
The stack trace is:
Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x2889ec1f __exceptionPreprocess + 126
1 libobjc.A.dylib 0x36049c8b objc_exception_throw + 38
2 CoreFoundation 0x288a3f55 __CFExceptionProem
3 CoreFoundation 0x288a1def ___forwarding___ + 354
4 CoreFoundation 0x287d3df8 _CF_forwarding_prep_0 + 24
5 UIAccessibility 0x331fc157 +[UIPasteboard_QSExtras pasteboardWithName:create:] + 30
6 MyApp 0x002eb507 -[TJEventOptimizer .cxx_destruct]
7 MyApp 0x002eb28b -[TJEventOptimizer .cxx_destruct]
8 MyApp 0x002f0c2b -[TJEventOptimizer .cxx_destruct]
9 MyApp 0x002eeedb -[TJEventOptimizer .cxx_destruct]
10 Foundation 0x295adb5b __NSThread__main__ + 1118
11 libsystem_pthread.dylib 0x3670ce93 _pthread_body + 138
12 libsystem_pthread.dylib 0x3670ce07 _pthread_start + 118
13 libsystem_pthread.dylib 0x3670ab90 thread_start + 8
Despite the fact, TapJoy is captured in the stack trace, their FAQ says it is ocaisonally wrong and has nothing to do with TapJoy's code, but rather iOS 8 bug.
Is it correct?
What accessibility setting related to the crash?
This problem appears because TapJoy has used categories in static library (that's UIPasteboard_QSExtras)
The solution is super simple, you need to notify linker about that
1) Click on the project
2) Click on the target
3) Open Build Settings tab
4) Search for Other Linker Flags
5) Double click on Other Linker Flags
6) Add -ObjC and -all_load flags
7)
Remove binary (delete from device/simulator),
Clean project (hitting cmd+shift+k) and
build again (hitting cmd+b).
You're ready to go!
the solution suggested by I0gg3r unfortunately does not work.. I tested this on 3 apps, and still find the UIPasteboard crash as most frequent crash.. Any other suggestions? Is there a way to disable the accessibility settings in the app?
Update: Tapjoy has released an update (10.2.1) which solves this issue. Please download their latest SDK

how to disable "profile" in monodevelop

In monodevelop try menu > project > profile mono..., before try it, every works fine , but now is imposible for me debug in iphone debug simulator. always same error
In release simulator work fine
In iphone real device work fine
In debug simulator the error:
I think disabled profile mono..., but is not posible, i dont know reason, Thanks.
Native stacktrace:
0 myprogram 0x0009524c mono_handle_native_sigsegv + 284
1 myprogram 0x0000bb38 mono_sigsegv_signal_handler + 248
2 libsystem_c.dylib 0x9ae6059b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 myprogram 0x001a4a62 single_arg_user_copy_or_mark + 34
5 myprogram 0x001ce400 mark_tls_slots + 128
6 myprogram 0x001a81b0 scan_from_registered_roots + 336
7 myprogram 0x001b4356 major_collection + 2886
8 myprogram 0x001b5098 mono_gc_collect + 88
9 myprogram 0x002233a6 monotouch_pump_gc + 38
10 libsystem_c.dylib 0x9ae08ed9 _pthread_start + 335
11 libsystem_c.dylib 0x9ae0c6de thread_start + 34
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
In order to use MonoDevelop's profiler you had to enable the SGEN garbage collector (GC). This is (from the stack trace) what's causing your crash.
You need to go back to your project's options (MonoTouch Build) and, under the Advanced tab, unselect the "Use SGEN generational garbage collector".
Once you have changed this, re-build your solution and it should work fine (the reason it works for release build is because the GC settings, like most of them, are kept separate between Debug and Release builds).
Now there's likely something broken because it should not be crashing like this. Would it be possible for you to report this issue (with a test case) to http://bugzilla.xamarin.com so our GC developers can get a look at what caused this issue ? Thanks!

Resources