App crashes on some devices after update - objective-c

Im experiencing something strange while updating my app in the Appstore. Version 1.4 worked fine for every device. However Version 2.0 crashes on some devices when updated. The loading screen wouldnt even show when starting up and the app would crash within a second. Removing and reinstalling the application from the app store solves this problem. Again this only happens on some devices (iPod, iPhone 4, iPhone 4s, iPad so far).
I manages to get my hands on a crashing device and check the Device logs. Also I think I found something but I cant really understand the error. It says:
Dyld Error Message:
Library not loaded: /System/Library/Frameworks/AdSupport.framework/AdSupport
Referenced from: /var/mobile/Applications/(ID)/AppName.app/AppName
Reason: image not found
Dyld Version: 199.6
I added AdSupport.framework because I implemented Facebook in my App in version 2.0 and the file is in my project in the folder 'Frameworks'.
Does somebody know how to fix this?
Here is the full crash Report if useful.
Incident Identifier: ID
CrashReporter Key: crash key
Hardware Model: iPod4,1
Process: AppName [35491]
Path: /var/mobile/Applications/id/AppName.app/AppName
Identifier: AppName
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2013-03-05 23:23:35.041 +0100
OS Version: iPhone OS 5.1.1 (9B206)
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread: 0
Dyld Error Message:
Library not loaded: /System/Library/Frameworks/AdSupport.framework/AdSupport
Referenced from: /var/mobile/Applications/(id)/AppName.app/AppName
Reason: image not found
Dyld Version: 199.6
Binary Images:
0x7a000 - 0x106fff +AppName armv7 <0c108dce50ee3e65970e2538a3e319f8> /var/mobile/Applications/(id)/AppName.app/AppName
0x2fe79000 - 0x2fe9afff dyld armv7 <77eddfd654df393ba9c95ff01715fd08> /usr/lib/dyld
0x3075a000 - 0x307d9fff libsqlite3.dylib armv7 <bf01f5ed47b033d8bde30d735ff44416> /usr/lib/libsqlite3.dylib
0x3113c000 - 0x311a0fff MessageUI armv7 <da7af4f9494b35558bf7892dfdb36ee3> /System/Library/Frameworks/MessageUI.framework/MessageUI
This iPod has iOS 5.1 but I also received report on iOS 6.1

Because AdSupport.framework, is ONLY available on iOS 6. So Dyld cannot find something who doesn't exist on past IOS. Even if you are adding framework into your project, you don't actually include the binary, only the reference.
If it's not crashing when you are reinstalling your app, it's because maybe it doesn't use the adSupport functionality at that time. But i'm not sure of this theory because i haven't made your code ;)
Here the apple available framework link, hope it will help you
http://developer.apple.com/library/ios/#documentation/miscellaneous/conceptual/iphoneostechoverview/iPhoneOSFrameworks/iPhoneOSFrameworks.html

Related

dyld: Library not loaded: #rpath/Realm.framework/Realm error with Realm Objective C framework

I have installed the Realm Objective C Framework (2.0.3) by simply dragging it into my project created in Xcode 8. When I first tried it on simulator I got the typical dyld error.
dyld: Library not loaded: #rpath/Realm.framework/Realm
Referenced from: /var/containers/Bundle/Application/89F5987A-F3F0-45F2-9014-6BA662135E00/RelamDemo.app/RelamDemo
Reason: image not found
So I tried to fix it using the following suggestion:
https://github.com/realm/realm-cocoa/issues/1681#issuecomment-120749962
And it worked on iOS 10 Simulators.
But when I tried to run the same project on a device (iOS 10/9.3.2) I got the same dyld error again.
I have checked that I have copied the Realm.framework in my project. Now how can I solve the problem?
You need to ensure that Realm.framework is also copied to the 'Embedded Binaries' section of your app as well.
You can find that section in the 'General' tab of your project's settings.
(Screenshot courtesy of this iOSDevCenter post)

How do I symbolicate a crash log for armv7 on iOS 8.1.1

I've got some crash logs from a user running iOS 8.1.1 on an armv7 device. Xcode will only symbolicate the lines from my app, and when I try to do it by hand I get lots of errors like this:
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: file: /Users/sgb/Library/Developer/Xcode/iOS DeviceSupport/8.1.1 (12B435)/Symbols/usr/lib/system/libsystem_kernel.dylib does not contain architecture: armv7
Can't understand the output from otool ( -> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -arch armv7 -l '/Users/sgb/Library/Developer/Xcode/iOS DeviceSupport/8.1.1 (12B435)/Symbols/usr/lib/system/libsystem_kernel.dylib')
I'm told that Xcode will symbolicate the crash logs if I can find an arm7 device running iOS 8.1.1. I have an arm7 device running vanilla iOS 8.1, and two hours they released iOS 8.1.2, so I can't get 8.1.1 onto it.
So what do I do? I can't ask the user to upgrade and get me more logs. How do I symbolicate the crash logs?
The issue is that Xcode 6 does not seem to have shipped with armv7 libraries for iOS 8. Compare these two dwarfdumps:
dwarfdump --uuid /Users/xxx/Library/Developer/Xcode/iOS\ DeviceSupport/8.1.1\ \(12B435\)/Symbols/usr/lib/system/libsystem_c.dylib
UUID: 415DBD55-796D-3413-819F-59EE8ACEBDA2 (armv7s) /Users/xxx/Library/Developer/Xcode/iOS DeviceSupport/8.1.1 (12B435)/Symbols/usr/lib/system/libsystem_c.dylib
dwarfdump --uuid /Users/xxx/Library/Developer/Xcode/iOS\ DeviceSupport/7.1.2\ \(11D257\)/Symbols/usr/lib/system/libsystem_c.dylib
UUID: 17AEC0BF-EB49-3308-9292-4005DC41C50E (arm64) /Users/xxx/Library/Developer/Xcode/iOS DeviceSupport/7.1.2 (11D257)/Symbols/usr/lib/system/libsystem_c.dylib
UUID: 5DA46A1B-0620-36F6-9C19-32E4EC6695FB (armv7s) /Users/xxx/Library/Developer/Xcode/iOS DeviceSupport/7.1.2 (11D257)/Symbols/usr/lib/system/libsystem_c.dylib
UUID: 371F0E18-54F0-3B05-BA14-3619E4EAC99F (armv7) /Users/xxx/Library/Developer/Xcode/iOS DeviceSupport/7.1.2 (11D257)/Symbols/usr/lib/system/libsystem_c.dylib
I tried for 8.0 as well, and got similar output as I did with 8.1.1. This leads me to believe that Apple just said "screw it" for armv7 devices for iOS 8 onward.
I poked around and it doesn't look like you can download any such libraries anywhere :(
Please correct me if you find out otherwise.

Import LocalAuthentication.framework crashes on iPhone5s with iOS 7.1

This question has been asked here before but the selected answer and comments does not resolve the problem. So I am asking it again and going to keep it simple.
I have an app in which am using Touch ID. It works fine in all devices except iPhone 5s with iOS 7.1.
To observe this thing.
Create a new Xcode project.
Add the LocalAuthentication framework.
Observe that the app crashes right away in iPhone 5s with iOS 7.1.
Now mark LocalAuthentication as optional but it still crashes on that specific device.
Note: I also set Link Frameworks Automatically to NO in build settings. Then I had to add "UIKit" framework to app manully. Apart from that I did nothing.
I also tried the same thing with apple sample code, it is also crashing for the same.
Crash Log:
dyld: Symbol not found: _objc_isAuto
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/lib/libobjc.A.dylib
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Please suggest something.

App crashed on IOS 7.0 works fine on 7.1

I have built an app that works well on IOS 7.1 but when installed on IOS 7.0 it crashes with the following logs:
dyld: lazy symbol binding failed: Symbol not found: _OSAtomicDecrement32
Referenced from: /var/mobile/Applications/80FCE91D-EAB5-4321-A157-4A05EA40C07C/MyAPP.app/MyAPP
Expected in: /usr/lib/libSystem.B.dylib
Aug 16 14:42:00 LAWR3NCEde-iPhone MyAPP[14925] <Notice>: dyld: Symbol not found: _OSAtomicDecrement32
Referenced from: /var/mobile/Applications/80FCE91D-EAB5-4321-A157-4A05EA40C07C/MyAPP.app/MyAPP
Expected in: /usr/lib/libSystem.B.dylib
The app uses Facebook SDK and MSDynamicsViewController (Which uses UIKit). Any idea what this message mean ? And what is this OSAtomicDecrement32 ?
OSAtomicDecrement32 is in OSAtomic.h. It is useful when implementing locks or retain counts in a multi-threaded program.
It's marked as being available on 7.1 and up only (on iPhone) which is why you are crashing.
__OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_7_1)
int32_t OSAtomicDecrement32( volatile int32_t *__theValue );

card.io will not compile on 64bit iPhone 5s armv7s

I'm having trouble compiling card.io on an iPhone 5s in 64bit mode (armv7s). It will compile on the simulator just finw. I am using Xcode 5.
Here is my error message:
Undefined symbols for architecture armv7s:
"_CMSampleBufferGetImageBuffer", referenced from:
-[CardIOVideoFrame process] in libCardIO.a(CardIOVideoFrame.o)
"_CMGetAttachment", referenced from:
-[CardIOVideoStream captureOutput:didOutputSampleBuffer:fromConnection:] in libCardIO.a(CardIOVideoStream.o)
ld: symbol(s) not found for architecture armv7s
Although, as #tomwhipple implied, you'll eventually run into other problems if you try to incorporate the current version of card.io into a 64-bit app, the particular error message you're getting now is due to something else.
Specifically, you must include the CoreMedia framework in your app's project.
See https://github.com/card-io/card.io-iOS-SDK for a complete list of the frameworks that you need to include.
A 64 bit version of card.io is under development, but not yet released. We'll update this Github issue when it's ready.