PushKit is incorrectly linked as an embedded framework in iOS 8 Beta 3
| Originator: | kenferry | ||
| Number: | rdar://17647271 | Date Originated: | 7/11/2014 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | |
| Classification: | Serious Bug | Reproducible: | Always |
When you link PushKit using Xcode beta 3 for iOS 8 Beta 3, it incorrectly links as an embedded framework. You can tell because the linker prints a warning:
ld: warning: relocatable dylibs (e.g. embedded frameworks) are only supported on iOS 8.0 and later (@rpath/PushKit.framework/PushKit)
otool also shows Pushkit is being linked with @rpath.
Load command 19
cmd LC_LOAD_WEAK_DYLIB
cmdsize 60
name @rpath/PushKit.framework/PushKit (offset 24)
time stamp 2 Wed Dec 31 16:00:02 1969
current version 1.0.0
compatibility version 1.0.0
Steps to Reproduce:
1. Create a new project that imports and tries to use PushKit
2. Set the project to build for armv7 (not sure why this is necessary...)
3. Run the project.
Expected Results:
It should run
Actual Results:
It crashes with this output:
dyld: Library not loaded: @rpath/PushKit.framework/PushKit
Referenced from: /private/var/mobile/Containers/Bundle/Application/BAE1858F-CC2C-4449-81C4-A5CC895A4288/PushMissing.app/PushMissing
Reason: no suitable image found. Did find:
/System/Library/Frameworks/PushKit.framework/PushKit: mach-o, but wrong architecture
Version:
iOS 8 12A4318c
Notes:
If you weak-link it instead (for projects also targeting iOS 7), it simply just doesn't link.
I attached a sample project that reproduces the issue.
Configuration:
iPad Air
Attachments:
'PushMissing.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!