Posts

Showing posts with the label Iphone

ApplicationDidEnterBackground And ApplicationWillEnterForeground Method Are Not Called When Pressed Home Button In IOS Simulator

Answer : On iOS13+, if you implement UIWindowSceneDelegate, it calls func sceneDidEnterBackground(_ scene: UIScene) , instead. The reason why applicationDidEnterBackground: and applicationDidEnterForeground: are never called is because these methods are used in joint with Application does not run in background this option can be found in your ***-info.plist . If this option is set to YES than your app will never call these methods, because these when you press the home button with an app that has set the option to YES the instance of the app that is running will get terminated so everytime you press the home button and then select the app icon a new instance is being created so it is using applicationWillTerminate: . The methods that Kirti mali has said would also be the incorrect methods to use for want you are after, the reason being is that applicationDidBecomeActive: and applicationWillResignActive: are used when something like when you answer a phone call. The instan...

Capturing Mobile Phone Traffic On Wireshark

Answer : Here are some suggestions: For Android phones, any network : Root your phone, then install tcpdump on it. This app is a tcpdump wrapper that will install tcpdump and enable you to start captures using a GUI. Tip: You will need to make sure you supply the right interface name for the capture and this varies from one device to another, eg -i eth0 or -i tiwlan0 - or use -i any to log all interfaces For Android 4.0+ phones : Android PCAP from Kismet uses the USB OTG interface to support packet capture without requiring root. I haven't tried this app, and there are some restrictions on the type of devices supported (see their page) For Android phones : tPacketCapture uses the Android VPN service to intercept packets and capture them. I have used this app successfully, but it also seems to affect the performance with large traffic volumes (eg video streaming) For IOS 5+ devices, any network : iOS 5 added a remote virtual interface (RVI) facility that lets you use M...

Apple - Any IPhone Apps To Test The Touchscreen?

Answer : Sparky works for testing multitouch, so you can try different areas of the screen by holding one finger in a place you know works and move the other elsewhere. If the line breaks, then the second finger is in a location that doesn't work. You can test it full screen (without the Safari UI but the status bar is still present) by adding it to the home screen.

Apple - Can An IPhone 7 Be Made To Function As A NFC Tag?

Answer : The iPhone is perfectly capable of this, but this is a privilege Apple keeps to themselves. If you're jailbroken, you can install NFCWriter X and do pretty much everything you've asked for. I haven't personally checked, but I would strongly assume this is the exact same way Apple Pay works as well. So the iPhone is certainly capable of this. The problem is that apps are not capable of this, because Apple denies them the availability of such an API. The CoreNFC framework only allows reading, and the story has gone so far as that organizations have sought fully third-party access to the iPhone's NFC chip on a legal basis. They were dismissed however, with Apple Pay keeping its uniquely privileged status. No. iPhone can function only as a NFC reader. It is not possible to use it as a NFC Tag, and read it via some external NFC reader. NFC is available in iPhone 6/6 Plus/6s/6s Plus/SE and NFC with reader mode is available in iPhone 7 and later.

A Valid Provisioning Profile For This Executable Was Not Found

Answer : Ok, so I solved this, somehow in trying to build for the app store I changed the build config for the "run" scheme from debug to release.. and naturally release was using a distribution cert.. which wasn't (and can't be) installed on my device. I hate xcode 4. (this aspect of it :P) What is a scheme anyway? :S I have a solution as well. This happened to me last night with the exact same error. I had a program that was previously compiling and now that I am adding an update to my app, the same error was displayed. The problem is that I forgot to change my provisioning profile back to Developer. (You set it to Distribution when uploading your app to the App Store). Here are the settings for Xcode 4.6. In your app click Targets -> YourAppName -> Code Signing Identy. Change iPhone Distribution to iPhone Developer. Your app will now compile. 1- TARGETS -> click the app-> Build Setting-> Code Signing : Make sure that both ...

Change Color Of UISwitch Appwise

Image
Answer : Finally, with iOS 5 you can change the color of the switch with the property onTintColor . UISwitch *s = [[UISwitch alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; s.on = YES; s.onTintColor = [UIColor redColor]; [self.view addSubview:s]; [s release]; produces this: For a global change for all UISwitch elements in Swift 3, use the appearance proxy: UISwitch.appearance().onTintColor = UIColor.brown under the AppDelegate application:didFinishLaunchingWithOptions: method. Currently you are limited to text values of On/Off or 0/1 for a UISwitch. You can customize the color by using tint. For further customization I would suggest something like what's been posted above going with a completely custom solution ex. [mySwitch setOnTintColor:[UIColor colorWithRed:0 green:175.0/255.0 blue:176.0/255.0 alpha:1.0]]; source: http://www.raywenderlich.com/4344/user-interface-customization-in-ios-5 EDIT: For iOS3, you are limited to a custom implimentation, I wo...

Changing The UINavigationBar Background Image

Answer : Starting in iOS 5 you should use the -setBackgroundImage:forBarMetrics: method: [myNavbar setBackgroundImage:[UIImage imageNamed: @"UINavigationBarBackground.png"] forBarMetrics:UIBarMetricsDefault]; And in Swift 4 : navigationBar.setBackgroundImage(UIImage(named: "UINavigationBarBackground.png"), for: .default) Considering all iOS versions, this seems to be accomplishing both Custom background image and Custom size of UINavigationBar: @interface CustomNavigationBar : UINavigationBar @end @implementation CustomNavigationBar -(void) drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"navigationBar"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; //for iOS5 [self setBackgroundImage:[UIImage imageNamed: @"navigationBar"] forBarMetrics:UIBarMetricsDefault]; } //for custom size of the UINavigationBar - (CGSize)sizeThatFits:(CGSize...