Bug 23765 - Library not loaded: @rpath/PushKit.framework/PushKit
Summary: Library not loaded: @rpath/PushKit.framework/PushKit
Status: RESOLVED UPSTREAM
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.2.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-11 22:55 UTC by Nic Wise
Modified: 2014-10-14 15:51 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
verbose output with nolinking (88.07 KB, text/plain)
2014-10-14 15:26 UTC, Nic Wise
Details
verbose with sdk linking (83.56 KB, text/plain)
2014-10-14 15:26 UTC, Nic Wise
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED UPSTREAM

Description Nic Wise 2014-10-11 22:55:05 UTC
I got this crash on startup when re-building an app for iOS8 SDK:

---

Incident Identifier: C86DF19B-EDC2-432D-8538-669405F8D41A
CrashReporter Key:   c9855921f937b5355f4f0c460efb91826f7bedf4
Hardware Model:      iPhone7,2
Process:             TripWallet [2824]
Path:                /private/var/mobile/Containers/Bundle/Application/ED8A8CFF-57D6-467A-B09D-455A3BD90C22/TripWallet.app/TripWallet
Identifier:          com.bigtedltd.TripWallet
Version:             3.3 (3.3)
Code Type:           ARM (Native)
Parent Process:      launchd [1]

Date/Time:           2014-10-12 15:25:22.957 +1300
Launch Time:         2014-10-12 15:25:22.574 +1300
OS Version:          iOS 8.0.2 (12A405)
Report Version:      105

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x00000000e7ffdefe
Triggered by Thread:  0

Dyld Error Message:
  Library not loaded: @rpath/PushKit.framework/PushKit
  Referenced from: /private/var/mobile/Containers/Bundle/Application/ED8A8CFF-57D6-467A-B09D-455A3BD90C22/TripWallet.app/TripWallet
  Reason: no suitable image found.  Did find:
	/System/Library/Frameworks/PushKit.framework/PushKit: mach-o, but wrong architecture
  Dyld Version: 353.5


----

I can't reproduce it in an new project, and it only happens on a NON-LLVM debug build on an iPhone 6 (possibly 6+ too). I've not tried it on a 5S yet. Simulator is fine.

The only external library I have now is Insights.

Happy to provide access to the source if you want it. Not a huge issue as I can test on my phone in Release mode and debug in the sim.

I don't use PushKit at all in my code. Could be an Apple issue (I found a whole 4 references to it on Google). Just realised I have xcode 6.0 not 6.0.1 so I'll try that first. But just incase, I'll keep this here.

My Environment:

=== Xamarin Studio ===

Version 5.6 (build 273)
Installation UUID: 3474e808-227f-485d-8e7f-fd508e329c0f
Runtime:
	Mono 3.10.0 ((detached/633e444)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000020

=== Apple Developer Tools ===

Xcode 6.0 (6299)
Build 6A313

=== Xamarin.iOS ===

Version: 8.2.0.193 (Enterprise Edition)
Hash: 959c1e4
Branch: 
Build date: 2014-10-03 00:25:37-0400

=== Build Information ===

Release ID: 506000273
Git revision: 4fdf44df17d841e324e22b99c0e4671360036dfd
Build date: 2014-10-07 18:16:52-04

=== Operating System ===

Mac OS X 10.10.0
Darwin cyanophobia.local 14.0.0 Darwin Kernel Version 14.0.0
    Tue Sep 23 23:01:41 PDT 2014
    root:xnu-2782.1.97~6/RELEASE_X86_64 x86_64
Comment 1 Nic Wise 2014-10-11 23:35:28 UTC
Nope. Upgraded to 6.0.1 and still the same problem.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-10-13 06:45:07 UTC
Do you have any extensions?

Also can you try enabling the linker (in the project's iOS Build options, set "Linker Behavior" to "Link all assemblies" or "Link SDK assemblies") and see if that changes anything?
Comment 3 Sebastien Pouliot 2014-10-13 15:40:37 UTC
Apple has a bug* where some devices do not have both a 32/64 bits PushKit library.

OTOH unless you're using "Don't link" (and there should not be a good reason for this) then this should not try to link to PushKit (even if you target the 8.0 SDK) for your application.

* I already reported during the 8.0 betas, but additional reports are often useful

Could you also attach a full (rebuild) build log to this bug report ? please add "-v -v -v -v" to the "Additional mtouch arguments" so we can see everything being done by the tools. Thanks!
Comment 4 Nic Wise 2014-10-14 15:25:41 UTC
Hi Rolf and Sebastien

No extensions, but changing away from "Dont link" fixes it. I thought don't link was the default for a debug build?

I'll upload the verbose logs in a second tho.

Thanks!
Comment 5 Nic Wise 2014-10-14 15:26:05 UTC
Created attachment 8418 [details]
verbose output with nolinking
Comment 6 Nic Wise 2014-10-14 15:26:24 UTC
Created attachment 8419 [details]
verbose with sdk linking
Comment 7 Sebastien Pouliot 2014-10-14 15:35:23 UTC
Hey Nic,

"Don't Link" is the default for simulator only. "Link SDK" is default for devices. 

You might want to disable the linker, on device, to enable incremental builds. However that presently trigger an Apple bug [1] wrt PushKit on some devices.

A workaround is enabling the linker (like the default) or use a deployment target that will not include PushKit [2], e.g. 7.1 when debugging (since your final, release executable should be linked).


[1] I do encourage you to file a bug report with Apple about this (I did a while ago but sadly it still shipped this way in IOS8) as duplicates often helps rising the priority of bug reports.

[2] avoid: -targetver "8.0"
Comment 8 Nic Wise 2014-10-14 15:51:48 UTC
Ah - this is an old project, so that might be why it's doing it. Or I set it up wrong ages ago.

I'll look at submitting a bug with apple - they will mark is as a dup, but hey.... thats how the rank things, I'm told... more dups, higher up the list.

thanks!