I ran into a problem lately. The UITapgesture working on simulator perfect and even while debugging directly on the device (iPhone 4, iOS 5.0.1) but when I package the app (Dep_Target iOS4.0m Base_SDK iOS5.1(latest)) for adhoc distribution and send it to client the gestures doesn't work. I then installed the build via test flight on the same device which I am using for debugging, the gesture doesn't work on it. I rechecked everything, I am using same build for distribution.
Any help will be much appreciated. Thanks
EDIT:
after doing a bit debugging it turns out that UITapgesture is not the culprit. The gesture method is getting fired but I've used a UIMenuController inside the gesture. The menu controller gets instantiated and all but not gets displayed on view. Besides the method:
- (BOOL) canPerformAction:(SEL)selector withSender:(id) sender
is not getting fired too. Do remember this all is happening in the build which is distributed via test flight, otherwise everything runs perfect.
I was getting this issue in one of my application and writing [self becomeFirstResponder] at the very first line in the function (i.e. before the line [[UIMenuController alloc] init]) solved my problem.
Related
I'm building a testing app to see if I can get my app to work with remote control.
I followed the apple documentation for remote control event handling shown at:
https://developer.apple.com/library/IOS/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/Remote-ControlEvents/Remote-ControlEvents.html#//apple_ref/doc/uid/TP40009541-CH7-SW3
Right now I have a dummy app that has nothing but the function calls/implementations shown in that article.
I've put some print statements, and found out that
remoteControlReceivedWithEvent is never being called.
I've done some research, and I'm sure I didn't forget to implement
canBecomeFirstResponder
I even put a print statement in it.
When I press the play button on my apple earpod, it just plays a music from the music app and does nothing else.
Can anyone tell me what the problem is?
I'm using the latest version of iOS7
=============== Edit 1 ====================
I tested motion and touch event and they seem to be working fine.
It's just the remote controller.
My App, which is created for iOS4, is crashing in iOS6 and is not installing on simulator or device.
It just shows the splash screen and crashes.
Did finish Launching is not being called.
Can anybody please Help?
Finally i got the solution of my problem mentioned above.
In my ios4 App, in FirstViewController.xib "Use AutoLayout" was checked.
I just removed the checkmark and my App start working.
Amazing!!!
I would recommend creating a new project, and either carefully looking for the changes in delegate or any deprecated code, or just moving all of your code to the new project. Also, you should run a convert to modern syntax check.
There may be issue with Application Delegate. The obvious reason - your object is not set as an application delegate.
Looking at Apple documentation there is quite a few ways to accomplish it:
Remove application delegate binding in Interface Builder (.xib file
for the window) Set 4th parameter of UIApplicationMain in main.h to
something else than nil.
Check you nib file in Interface Builder and see if the App Delegate is setup.
Or Reference to documentation Core Application Design
Hope this will you out.
Look into the release notes of xcode, ios6
It is said that when working with IOS6, Auto Layout is turned on and that crashes the app if used on older versions. Check the link, which has other things to watch out for:
https://developer.apple.com/library/mac/#releasenotes/DeveloperTools/RN-Xcode/_index.html
https://developer.apple.com/library/ios/#releasenotes/General/RN-iOSSDK-6_0/_index.html
I am testing backward compatibility of an app before submitting it to the app store.
iOS 5 devices run the app great, but now I'm testing on an old iPod touch with iOS 4.2.1.
What Goes Wrong:
At one point (always the same point), the app just hangs - it doesn't crash, just freezes so I'm thinking it's not a lack of memory causing it.
No errors are displayed, however following the code by setting breakpoints results in this line:
myWebView = [[UIWebView alloc] initWithFrame:webFrame];
running but never finishing.
So:
What might be going wrong, what can I do to further get more info/logs about what may be happening? Any ideas are much appreciated, thanks!
Make sure that you don't have duplicate entries like instance variable and property for "_myWebView" and "myWebView". Try to use _myWebView.
Try to remove assignment statement and see if it works then problem is duplicating ivar and property.
I am setting the userTrackingMode of an MKMapView instance in my UIViewController's viewLoaded method. The first time the view loads I set it to MKUserTrackingModeFollowWithHeading successfully. However every subsequent time the view loads, though I again set its value to MKUserTrackingModeFollowWithHeading, this is almost immediately overritten by MKUserTrackingModeNone. I have subclassed MKMapView and overridden setUserTrackingMode, inserting a breakpoint so I can see where it is being called from. The same thing happens in both simulator and on device:
On simulator I get the following from the stack when the value is set to MKUserTrackingModeNone:
On my device (iPhone 4s) I get the following:
There is very little else going on in my application and certainly nothing that is directly triggering the property to be set. What is CLSqliteDatabaseManager? Google returns not a single result. On the device how on earth can MKMapRectContainsRect be involved? I'm using iOS 5.0.
It seems too late to answer. But it may still be helpful for whoever is looking for an answer.
I had exactly same problem. Suddenly I figure out why. Please load your iOS build-in Maps app and click the small arrow button at bottom-left corner to start tracking your location. As soon as you drag the map. The tracking is stopped. Same reason, if you move the map in your code, the MKMapView property userTrackingMode will be reset to MKUserTrackingModeNone automatically.
In my case, I called setCenterCoordinate after set userTrackingMode to MKUserTrackingModeFollow in - (void)viewWillAppear:(BOOL)animated. It worked fine after moving around the code mapView.userTrackingMode = MKUserTrackingModeFollow; to the end.
I have an app that worked perfectly fine w/ ios 4.x
the app works like this
launch app
click button that launches camera
take pic
click use
this takes you to another screen where you can tag the photo
etc...
Now when i click use button the app just freezes, there is no crash, no debug message nothing. I have tried setting break points etc.. and I just dont know what else to try. Any help is greatly appreciated.
--thx
I post another answer to make the answer clearer.
I just found the ( simple ) solution to this problem:
I replaced:
[[[UIApplication sharedApplication] keyWindow] setRootViewController:self];
[[self parentViewController] dismissModalViewControllerAnimated:YES];
by:
[self dismissModalViewControllerAnimated:YES];
It worked on iOS 5 as it was working on iOS 4. I didn't test in iOS 4 yet but I think it's working similarily.
Please confirm me it's also working for you.
If it is freezing, without a crash, then you might be stuck in an infinite loop somewhere. As long as you are attached to the debugger when it is running, you can just pause the application while it is stuck, and it should give you some indication where it is getting held up.