iPhone universal app. MoviePlayer.framwork problem - iphone

I have application based on 3.0 iPhone OS SDK
One of tasks is playing video (I use MPMoviePlayerController for this task)
Now I try to make universal app working on both 3.0 and 3.2 OS
I did all steps described in apple documentation: Upgrade Current Target for iPad; make run-time checking for symbols using
[[UIDevice currentDevice] respondsToSelector:#selector(userInterfaceIdiom)]
function. But when I start my application on device - iPhone with OS 3.1.3 my apllication is crashes with next log:
Tue May 25 18:00:28 unknown SpringBoard[24] <Notice>: MultitouchHID(208b30) uilock state: 1 -> 0
Tue May 25 18:00:29 unknown SpringBoard[24] <Notice>: MultitouchHID(292580) device bootloaded
Tue May 25 18:00:34 unknown UIKitApplication:...[0xaa0f][1517] <Notice>: dyld: Symbol not found: _MPMoviePlayerWillEnterFullscreenNotification
Tue May 25 18:00:34 unknown UIKitApplication:...[0xaa0f][1517] <Notice>: Referenced from: /var/mobile/Applications/876EA35E-5756-436B-A9E2-5481D4D62050/....app/...
Tue May 25 18:00:34 unknown UIKitApplication:...[0xaa0f][1517] <Notice>: Expected in: /System/Library/Frameworks/MediaPlayer.framework/MediaPlayer
Tue May 25 18:00:35 unknown kernel[0] <Debug>: launchd[1517] Builtin profile: container (seatbelt)
Tue May 25 18:00:35 unknown kernel[0] <Debug>: launchd[1517] Container: /private/var/mobile/Applications/876EA35E-5756-436B-A9E2-5481D4D62050 (seatbelt)
Tue May 25 18:00:35 unknown ReportCrash[1518] <Notice>: Formulating crash report for process cnetmobile[1517]
Tue May 25 18:00:36 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:...[0xaa0f]) Job appears to have crashed: Trace/BPT trap
Tue May 25 18:00:36 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:...[0xaa0f]) Throttling respawn: Will start in 2147483646 seconds
Tue May 25 18:00:36 unknown SpringBoard[24] <Warning>: Application '...' exited abnormally with signal 5: Trace/BPT trap
Tue May 25 18:00:36 unknown ReportCrash[1518] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/..._2010-05-25-180034_...-iPhone.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Tue May 25 18:01:36 unknown SpringBoard[24] <Notice>: MultitouchHID(208b30) uilock state: 0 -> 1
As you can see the error is "Symbol not found: _MPMoviePlayerWillEnterFullscreenNotification". This symbol is notification available in MediaPlayer.framework starting from iPhone OS 3.2
So, what am I doing wrong? What I should do to have universal application working correct on OS 3.2 (with new available functionality) and older OSes (with their functionality)?

The content of that constant is the string #"MPMoviePlayerWillEnterFullscreenNotification", so you can use this string in place of the constant.
Alternatively, you could
use functions like dlsym to get the symbol at runtime; or
make that symbol weakly linked (= doing step 1 automatically)

It's MediaPlay.framework not added.

Related

App crash report in device logs

I'm facing a problem with a crash after testing my application for more than 20 minutes. It is crashing somewhere but I'm not able to find where it is crashing. I enabled NSZombiaEnable but still, I don't get any correct report.
Below is my device crash log:
Nov 22 23:49:31 unknown UserEventAgent[12] <Notice>: jetsam: kernel termination snapshot being created
Nov 22 23:49:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilemail[0x56d0]) Exited: Killed: 9
Nov 22 23:49:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.yqlabsEnterprise.ticketPadPUSHCHAT[0xee8a]) Bug: launchd_core_logic.c:3733 (25562):0
Nov 22 23:49:31 unknown com.apple.debugserver-64[1522] <Warning>: 1 [05f2/1303]: error: ::read ( 4, 0x2ff179d4, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Nov 22 23:49:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.yqlabsEnterprise.ticketPadPUSHCHAT[0xee8a]) Bug: launchd_core_logic.c:3732 (25562):3
Nov 22 23:49:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.yqlabsEnterprise.ticketPadPUSHCHAT[0xee8a]) Assuming job exited: <rdar://problem/5020256>: 10: No child processes
Nov 22 23:49:31 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.yqlabsEnterprise.ticketPadPUSHCHAT[0xee8a]) Job appears to have crashed: Segmentation fault: 11
Nov 22 23:49:31 unknown SpringBoard[51] <Warning>: Application 'Mail' exited abnormally with signal 9: Killed: 9
Nov 22 23:49:32 unknown SpringBoard[51] <Warning>: Application 'ticketPad' exited abnormally with signal 11: Segmentation fault: 11
Nov 22 23:49:32 unknown kernel[0] <Debug>: launchd[1576] Builtin profile: MobileMail (sandbox)
Nov 22 23:49:33 unknown ReportCrash[1575] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-11-22-234933.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
Please help me.
because it isnt a bad access, there wont be a zombie... its segfaulting.
cause #1:
bad format in an NSLog or stringWithFormat :D (at least for me)
cause #2:
if that's not it try looking for c-code you use that may not exist.
(non-existing symbols)
top hint: cause #3:
the IOS filesystem is case sensitive, maybe the xib name you specify is somehow wrong and it cant load the xib? / a xib itself is corrupt
cause #4:
google for "Assuming job exited: : 10: No child processes" :D

I cannot run my app on my old iPhone 2G

I have:
iPhone 2G with iOS 3.1.3 on it,
XCode 4.2 running on it.
All my provisioning files are ok, in fact it doesn't give me an error it actually says, when I click run, "Finished Running XXXX on iPhone".
On my -info.plist file:
Required device capabilities Array (1 item)
Item 0 String arm6
On Build Settings:
Architectures => arm6
Base SDK => Latest iOS (iOS 5.0)
Valid Architectures => arm6
iOS Deployment Target => iOS 3.1
Now what I am seeing is that on the Organizer>iPhone>Console I have these weird
messages that are being generated on a continuous basis (at least while I keep
he app "running" ):
Fri Jan 27 12:52:03 unknown com.ikey.bbot[3685] <Notice>: No matching processes
were found
Fri Jan 27 12:52:03 unknown com.ikey.bbot[3685] <Notice>: cp:
Fri Jan 27 12:52:03 unknown com.ikey.bbot[3685] <Notice>: cannot stat
/var/log/youcanbeclosertogod.jpg
Fri Jan 27 12:52:03 unknown com.ikey.bbot[3685] <Notice>: : No such file or directory
Fri Jan 27 12:52:04 unknown ReportCrash[3693] <Notice>: Formulating crash report for
process poc-bbot[3685]
Fri Jan 27 12:52:04 unknown com.apple.launchd[1] <Warning>: (com.ikey.bbot) Job
appears to have crashed: Bus error
Fri Jan 27 12:52:04 unknown ReportCrash[3693] <Error>: Saved crashreport to
/Library/Logs/CrashReporter/poc-bbot_2012-01-27-125203_iPhone.plist using uid: 0
gid: 0, synthetic_euid: 0 egid: 0
But nothing happens on the iPhone.
Is this your only iPhone or are you just trying to support iOS3? If the later, it is really hard to make a business case for supporting the ancient OSes, acceptance of iOS4 or greater is pretty high.

App Release Version crashes Debug Version works, no idea why

So I have this app I'm working on and after building running the App from XCode on the device everything works fine. However after installing the same App from the App Store (no changes only the provisioning profile is different) the App crashes shortly before it starts.
Console errors:
Fri Sep 30 12:48:42 unknown locationd[540] <Notice>: MS:Notice: Installing: (null) [locationd] (550.32)
Fri Sep 30 12:49:47 itess Ola Portugal[556] <Notice>: MS:Notice: Installing: com.mindovertech.olaportugal [Ola Portugal] (550.32)
Fri Sep 30 12:49:47 itess kernel[0] <Debug>: launchd[556] Builtin profile: container (sandbox)
Fri Sep 30 12:49:47 itess kernel[0] <Debug>: launchd[556] Container: /private/var/mobile/Applications/13E9B45C-84ED-4FD3-BDAA-8527BA34CB3F [69] (sandbox)
Fri Sep 30 12:49:47 itess Ola Portugal[556] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/Activator.dylib
Fri Sep 30 12:49:47 itess Ola Portugal[556] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/PDFPatch_CVE-2010-1797.dylib
Fri Sep 30 12:49:49 itess locationd[557] <Notice>: MS:Notice: Installing: (null) [locationd] (550.32)
Fri Sep 30 12:49:51 itess Ola Portugal[556] <Warning>: Warning: Libinfo call to mDNSResponder on main thread
Fri Sep 30 12:49:56 itess ReportCrash[559] <Notice>: Formulating crash report for process Ola Portugal[556]
Fri Sep 30 12:49:57 itess com.apple.launchd[1] (UIKitApplication:com.mindovertech.olaportugal[0xeace][556]) <Warning>: (UIKitApplication:com.mindovertech.olaportugal[0xeace]) Job appears to have crashed: Bus error
Fri Sep 30 12:49:57 itess SpringBoard[28] <Warning>: Application 'Olá Portugal' exited abnormally with signal 10: Bus error
Fri Sep 30 12:49:57 itess ReportCrash[559] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/Ola Portugal_2011-09-30-124953_itess.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Device log:
Incident Identifier: B2ABCA98-7942-4FF2-968A-F5FE4AFDDE4D
CrashReporter Key: fd9745556d91de13e834ad1bbd0bee6c29b17976
Hardware Model: iPod2,1
Process: Ola Portugal [556]
Path: /var/mobile/Applications/13E9B45C-84ED-4FD3-BDAA-8527BA34CB3F/Ola Portugal.app/Ola Portugal
Identifier: Ola Portugal
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-09-30 12:49:53.028 +0100
OS Version: iPhone OS 4.0 (8A293)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00816a00
Crashed Thread: 0
Thread 0 Crashed:
0 ??? 0x00816a00 0 + 8481280
(Didn t copy the other threads because they seems to be fine)
Here's one more detail, the device where it crashes is an iPod touch running 4.0
The same App (from the App Store) works perfectly on an iPhone4/iPad2 running 4.3.3
I'm not sure if the problem is with the device or with the OS and what I can do to fix it.
Like I said before If I run the debug version on the device from XCode it works fine.
Any ideas?
Generally this kind of error occurs when we are updating new version on store because of coredata.
If you have changed any thing related to coredata then you need to delete old .Sqlite file at first launch of new version. remember not every time to delete .squlite but only once the application starts and old file exist.
I forgot about this thread. I eventually found out it had to do with iAD, I was using an instruction available on 4.1 but not 4.0

App works on iPhone but it doesn't work on iPod Touch

I have an app that i can deploy on iPhone 3GS or 4 and it work with no problem. But when i try to deploy it on iPod Touch 3rd and 4th gen it builds with no errors but nothing appears except a black screen.
Here is the log that i get from the device when i try to instal the app.
Aug 31 10:46:33 unknown misagent[1741] <Error>: libMobileGestalt loadBasebandMobileEquipmentInfo: CommCenter error: 1:45
Aug 31 10:46:33 unknown misagent[1741] <Error>: libMobileGestalt copyInternationalMobileEquipmentIdentity: Could not get mobile equipment info dictionary
Aug 31 10:46:33 unknown misagent[1741] <Error>: profile not valid: 0xe8008012
Aug 31 10:46:35 unknown installd[1744] <Error>: libMobileGestalt loadBasebandMobileEquipmentInfo: CommCenter error: 1:45
Aug 31 10:46:35 unknown installd[1744] <Error>: libMobileGestalt copyInternationalMobileEquipmentIdentity: Could not get mobile equipment info dictionary
Aug 31 10:46:35 unknown SpringBoard[27] <Warning>: Killing <SBApplication: 0x1dac2200> 'myApp' activate: deactivate: for app installation
Aug 31 10:46:36 unknown installd[1744] <Error>: libMobileGestalt copyInternationalMobileEquipmentIdentity: Could not get mobile equipment info dictionary
Aug 31 10:46:36 unknown SpringBoard[27] <Warning>: Reloading application state for 'myApp' as its modification date has changed
Aug 31 10:46:36 unknown SpringBoard[27] <Warning>: Reloading and rendering all application icons.
Aug 31 10:46:38 unknown com.apple.debugserver-50[1748] <Warning>: debugserver-50 for armv6 Copyright (c) 2007-2009 Apple, Inc. All Rights Reserved.
Aug 31 10:46:38 unknown com.apple.debugserver-50[1748] <Warning>: Connecting to com.apple.debugserver service...
Aug 31 10:46:38 unknown kernel[0] <Debug>: lockbot[1740] Builtin profile: debugserver (sandbox)
Aug 31 10:46:38 unknown SpringBoard[27] <Notice>: MultitouchHID(1cd13310) uilock state: 1 -> 0
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) platform_supports_camera_import: Platform is configured for camera import
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) media_attach_callback: Inspecting the attached media
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) handle_attached_media: The attached media object is a disk image. Dropping like it's hot.
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) media_attach_callback: Inspecting the attached media
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) handle_attached_media: The attached media disk0s2s1 is not removable. Ignoring.
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) media_attach_callback: Inspecting the attached media
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) handle_attached_media: The attached media disk0s2 is not removable. Ignoring.
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) media_attach_callback: Inspecting the attached media
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) handle_attached_media: The attached media disk0s1 is not removable. Ignoring.
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) media_attach_callback: Inspecting the attached media
Aug 31 10:46:38 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) handle_attached_media: The attached media disk0 is not removable. Ignoring.
Aug 31 10:46:38 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:myApp[0x1ab2]) Spawned and waiting for the debugger to attach before continuing...
Aug 31 10:46:38 unknown com.apple.debugserver-50[1748] <Warning>: Got a connection, waiting for debugger instructions for task "(null)".
Aug 31 10:46:39 unknown kernel[0] <Debug>: set_crc_notification_state 0
Aug 31 10:46:39 unknown kernel[0] <Debug>: launchd[1750] Builtin profile: container (sandbox)
Aug 31 10:46:39 unknown kernel[0] <Debug>: launchd[1750] Container: /private/var/mobile/Applications/8ASD873E87-A23C-4234-8848-234KJAS23 [69] (sandbox)
Aug 31 10:46:48 unknown MobileStorageMounter[1749] <Notice>: (0x3ec9048c) idle_timer_callback: Exiting after idle timeout
OK, I have resolved this very easily. Even I have stated my nib files in pList, somehow only iPad nib file was displayed as Main Interface when I look at the project target summary. So I put there the one that should be there and now it is working on IPod as well.
It looks like you're trying to get mobile type info (IMEI etc presumably), and there won't be any on an iPod Touch.
I'd look for 2 posible causes: iOS versions, phone specific code.
For the first option, I'd try to use the iphone simulator on different versions (you can change that on the simulator itself). If that doesn't look like the problem, then try to search for a place in your code where you might use phone specific things, like trying to get the IMEI.

App is Crashing on iPod Touch First and Second Generation

My released app (Hidden London - Free App) has been reported as crashing on iPod touch 2nd and 3rd Generation. It works without issue on iPhone and iPad.
The crash log is as follows:
Wed Apr 13 09:03:40 unknown kernel[0] <Debug>: launchd[908] Builtin profile: container (sandbox)
Wed Apr 13 09:03:40 unknown kernel[0] <Debug>: launchd[908] Container: /private/var/mobile/Applications/E509FC07-A742-4483-95B1-7393B3F129B9 [69] (sandbox)
Wed Apr 13 09:03:40 unknown sandboxd[911] <Notice>: HiddenLondon(908) deny file-write-data /private/var/mobile/Applications/E509FC07-A742-4483-95B1-7393B3F129B9/HiddenLondon.app/HiddenLondon.sqlite
Wed Apr 13 09:03:40 unknown HiddenLondon[908] <Warning>: Not purchased: com.Beutelkind.HiddenLondon.ExtraPlaces
Wed Apr 13 09:03:40 unknown HiddenLondon[908] <Warning>: Not purchased: com.Beutelkind.HiddenLondon.RemoveAds
Wed Apr 13 09:03:42 unknown securityd[910] <Error>: OCSPResponse: now + maxAge > latestNextUpdate, using latestNextUpdate
Wed Apr 13 09:03:42 unknown com.apple.SpringBoard[24] <Notice>: CoreAnimation: timed out fence 500
Wed Apr 13 09:04:00 unknown HiddenLondon[908] <Warning>: ADBannerView: WARNING A banner view (0x159470) has an ad but may be obscured. This message is only printed once per banner view.
Wed Apr 13 09:04:31 unknown configd[22] <Notice>: jetsam: kernel memory event (90), free: 323, active: 1250, inactive: 1494, purgeable: 0, wired: 7841
Wed Apr 13 09:04:31 unknown configd[22] <Notice>: jetsam: kernel termination snapshot being created
Wed Apr 13 09:04:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.AdSheetPhone[0xabc0]) Exited: Killed
Wed Apr 13 09:04:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.Beutelkind.HiddenLondon[0x2fef]) Exited: Killed
Wed Apr 13 09:04:31 unknown SpringBoard[24] <Warning>: Received memory warning. Level=1
Wed Apr 13 09:04:31 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.apple.mobilemail[0x736e]) Exited: Killed
Wed Apr 13 09:04:31 unknown SpringBoard[24] <Warning>: Received memory warning. Level=1
Wed Apr 13 09:04:32 unknown SpringBoard[24] <Warning>: Application 'AdSheet' exited abnormally with signal 9: Killed
Wed Apr 13 09:04:32 unknown SpringBoard[24] <Warning>: Application 'HiddenLondon' exited abnormally with signal 9: Killed
Wed Apr 13 09:04:32 unknown SpringBoard[24] <Warning>: Application 'Mail' exited abnormally with signal 9: Killed
Wed Apr 13 09:04:32 unknown SpringBoard[24] <Warning>: Memory level is not normal (56%). Delaying auto-relaunch of 'Mail' for 30 seconds.
Wed Apr 13 09:04:32 unknown SpringBoard[24] <Warning>: Received memory warning. Level=1
Wed Apr 13 09:04:33 unknown ReportCrash[917] <Error>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2011-04-13-090433.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
Could anyone help me start to troubleshoot why this might be happening on the iPod Touch?
The hint to why your app is crashing is Received memory warning. Level=1. You're out of memory. This could be the amount of RAM your app is using for data structures, but I've more typically seen this type of error when you run out of graphics memory - i.e. the memory used to composite views, cache images, etc. The total amount of RAM on gen 1 and 2 iPod touches is only 128MB. Gen 3 and 4 bumped that to 256MB.
The memory related info in your log starts with jetsam: kernel memory event (90), free: 323, active: 1250, inactive: 1494, purgeable: 0, wired: 7841, which is a "low memory" warning message. You then see a whole bunch of apps being terminated by the OS (Exited: Killed and exited abnormally with signal 9: Killed). This is the documented behaviour of iOS in low memory conditions - it kills apps until it has enough free memory.
I believe that your application is using a lot of memory, and as a result it gets killed by the operating system.