Menu
  • HOME
  • TAGS

UITapGestureRecognizer not working on iOS9

ios,xcode,uigesturerecognizer,xcode7,ios9

It seems that iOS9 looks for a <pressTypeMask key="allowedPressTypes"/> line in the xml of the gesture recognizer and the tap recognizer doesn't work without it. To fix you can either build your recognizers in code, add that line into the xml or delete and re-add the gesture recognizer in Xcode...

Custom UIButton Swift 2.0

ios,swift,uibutton,ios9

Did you try this? var myButton = MyCustomButton(type: .Custom) ...

Xcode 6 with iOS 9?

ios,iphone,xcode,ios9

Yes, you need to install Xcode 7 in order to develop for iOS 9. You are able to keep Xcode 6 running alongside Xcode 7.

How to make a segue from SpriteKit GameScene to UIViewController programmatically in iOS 9 with Swift2

sprite-kit,segue,identifier,swift2,ios9

Segue identifiers are String objects, so you should call performSegueWithIdentifier with "push" instead of referencing it as a variable. This code should work: func segue(){ self.viewController.performSegueWithIdentifier("push", sender: viewController) } ...

New warnings in iOS9

xcode,ios9

You library was compiled without bitcode but the bitcode option is enabled in your project settings. Say NO to Enable Bitcode in your target Build Settings and the Library Build Settings to remove the warnings. ...

Is there an example code for corespotlight search feature - iOS 9 API?

objective-c,xcode7,ios9,corespotlight

Yeah, I created a demo project to user NSUseractivity and corespotlight feature in iOS 9 using Xcode 7. Here is the github link: https://github.com/majain/iPhoneCoreDataRecipes I used the sample code from Apple and implemented corespotlight on top of it. ...

iOS 9 not opening Instagram app with URL SCHEME

ios,swift,swift2,ios9

iOS 9 has made a small change to the handling of URL scheme. You must whitelist the url's that your app will call out to using the LSApplicationQueriesSchemes key in your Info.plist. Please see post here: http://awkwardhare.com/post/121196006730/quick-take-on-ios-9-url-scheme-changes The main conclusion is that: If you call the “canOpenURL” method on a...

yellow Warnings : Conditional cast from UITextDocumentProxy to UIKeyInput always succeeds

ios,xcode,swift,xcode7,ios9

These aren't errors, they are just warnings and they probably aren't the cause of your crashes however you can resolve these two examples by doing the following: The UITextDocumentProxy protocol conforms to UIKeyInput anyway so there is no need to cast kbd.textDocumentProxy as UIKeyInput. You will be able to do...

Linking error when building Parse in Xcode 7

swift,parse.com,ios9,xcode7,swift2

I will suggest to integrate Parse using Cocoapod. Cocoapod manages the library dependencies much much better way. Sample of pod file : source 'https://github.com/CocoaPods/Specs.git' platform :ios, '7.0' inhibit_all_warnings! target 'YourProjectName' do pod 'Parse', '~> 1.7.1' pod 'AFNetworking', '2.2.3' end ...

BETA iOS9 deployment to test devices

ios9,xcode7

With any iOS version, it depends on the minimum requirements for the app you're making. If you use any code that requires iOS 9 or set your projects requirements to iOS 9, it won't run on iOS 8 devices. But if you make an app designed for iOS 8 or...

Using Xcode7's UI tests to create app screenshots for the App Store

ios,swift,xctest,xcode7,ios9

This isn't completely related to Xcode 7, but you can automate screenshot taking with snapshot.

No back button on segue in Swift 2

ios,swift,segue,swift2,ios9

Are you using show or show detail segue? It seems like you are using a modal segue. Destination view controller for show or show segue is usually the second view controller itself, and not embedded in another UINavigationController. If you're destination view controller for the show segue is really a...

Initializing int4 using Swift; bug or expected behaviour?

swift,simd,swift2,ios9

At a first glance, this looks like expected behavior. When you specify let test = int4(1,2,3,4) the integer literals there are implicitly initialized as Int32 types. When you just do a let x = 1 x by default has a type of Int. As a safety measure, Swift doesn't do...

Synchronous URL request on Swift 2

ios,iphone,swift2,ios9

There is a reason behind deprecation - there is just no use for it. You should avoid synchronous network requests as a plague. It has two main problems and only one advantage (it is easy to use.. but isn't async as well?): The request blocks your UI if not called...

setStatusBarHidden is deprecated in iOS 9.0

objective-c,ios9

Add below code to your view controller.. - (BOOL)prefersStatusBarHidden { return NO; } Note : If you change the return value for this method, call the setNeedsStatusBarAppearanceUpdate method. For childViewController, To specify that a child view controller should control preferred status bar hidden/unhidden state, implement the childViewControllerForStatusBarHidden method. ...

Api Call Error in Xcode 7 / iOS 9 (how to setup App Transport Security in plist)

ios,httprequest,xcode7,ios9

In iOS9, Apple added new feature called App Transport Security(ATS). ATS enforces best practices during network calls, including the use of HTTPS. Apple Pre-release documentation: ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should adopt ATS as soon as possible, regardless of whether you’re...

CoreSpotlight indexing not working

ios,swift,search,ios9,corespotlight

Try use itemContentType initializer like so : let atset:CSSearchableItemAttributeSet = CSSearchableItemAttributeSet(itemContentType: kUTTypeImage as String) atset.title = "Simple title" atset.contentDescription = "Simple twitter search" let item = CSSearchableItem(uniqueIdentifier: "id1", domainIdentifier: "com.shrikar.twitter.search", attributeSet: atset) CSSearchableIndex.defaultSearchableIndex().indexSearchableItems([item]) { (error) -> Void in print("Indexed") } The kUTTypeImage is declared in MobileCoreServices....

App crashes when I delete from table view and core data

swift,tableview,ios9

The problem was I had not implemented all of the fetchedResultsControllerDelegate methods. Once I added all four methods, the delete worked perfectly. Thanks for everyones help though.

Swift 2 migration problems

ios,xcode,swift,ios9

Here's your updateAction() function with Swift 2.0's do/try/catch implementation: func updateAction(){ var firstRandomNumber = Int(arc4random_uniform(5)) var firstCardString:String = String(self.cardNamesArray[firstRandomNumber]) var secondRandomNumber = Int(arc4random_uniform(5)) var secondCardString:String = String(self.cardNamesArray[secondRandomNumber]) self.firstCardImageView.image = UIImage(named: firstCardString) self.secondCardImageView.image = UIImage(named: secondCardString) let fileLocation =...

CloudKit Zone CKSubscriptionOptions

cloudkit,ios9

Indeed the CKSubscriptionOptions enum does not have an option for 0. You can force a value of 0 by using CKSubscriptionOptions(rawValue:0)

How to run apps on iPhone/iPad using Xcode 7 without enrolling to Apple's developer program?

ios9,xcode7

http://9to5mac.com/2015/06/10/xcode-7-allows-anyone-to-download-build-and-sideload-ios-apps-for-free/?pushup=1 Here you go. Cheers. This article show you how to do it....

I am using Camera API and QRCode API in my Project, Can i implement multitasking(splitvIew) in my Project

ios,multitasking,ios9

If you app is camera-centric app OR Gaming related, Then Apple suggest to opt out above feature. Apple Documentation Says Consider opting out only if your app falls into one of these narrow categories: Camera-centric apps, where using the entire screen for preview and capturing a moment quickly is your...

Getting video from Asset Catalog using On Demand ressources

ios,xcode,xcode7,ios9,asset-catalog

I think its not possible to use Asset Catalog for video stuff, Its simplify management of images. Apple Documentation Use asset catalogs to simplify management of images that are used by your app as part of its user interface. An asset catalog can include: Image sets: Used for most types...

I have a bug when I run my project with xcode7,ios9

xcode7,ios9

From your error message: Application windows are expected to have a root view controller at the end of application launch How old is this "old" project? If it's more than a few years, do you still have: [window addSubview:viewController.view]; You should instead replace it with: [window setRootViewController:viewController]; ...

Why is ActivityViewController displaying auto constraint errors in console?

ios,swift,uialertview,xcode7,ios9

Either: This is an Apple bug - report it to http://radar.apple.com as long as it's still in beta You present the modal from a oversized view controller (bug in frames?) and then the constraint V:[UIView:0x7c0a2fa0(<=528) breaks Should you be worried? 1. It won't cause crashes, but still it's a sign...

iOS 9: Application Transport Security plist configurations

ios,security,plist,nsurl,ios9

After doing some more research I was able to answer my own question. So basically you are saying everything needs to default to not using ATS by setting NSAllowsArbitraryLoads = YES. But then in your exceptions dictionary(NSExceptionDomain) you are specifying endpoints that you want to act differently. So that means...

How to send data from Iphone to Watchkit in OS2 in SWIFT

swift,watchkit,xcode7,ios9

This blog post should help you out. From that post: First, you'll create and activate a WCSession like so: if (WCSession.isSupported()) { let session = WCSession.defaultSession() session.delegate = self session.activateSession() } For transferring a dictionary: let applicationDict = // Create a dict of application data let transfer = WCSession.defaultSession().transferUserInfo(applicationDict) Then,...

The protocol method of GKAgentDelegate is not right in Swift?

swift,sprite-kit,ios9,gameplay-kit

As GKAgent2D is a subclass of GKAgent, you can simply upcast it: func agentDidUpdate(agent: GKAgent) { if let agent2d = agent as? GKAgent2D { // do thing with agent2d.position } } The documentation for GKAgentDelegate (from Xcode 7, beta 1; i.e. the OSX 10.11 SDK) shows the same type (GKAgent)...

allowsBackgroundLocationUpdates in CLLocationManager in iOS9

ios,swift,core-location,cllocationmanager,ios9

If you're using CoreLocation framework in your app in Xcode7(pre-released),and you may notice that there is a newly added property called allowsBackgroundLocationUpdates in CLLocationManager class. This new property is explained in the WWDC session "What's New in Core Location". The default value is NO if you link against iOS 9....

When and why should I work with a “beta SDK”? [closed]

objective-c,beta,ios9,xcode7,osx-elcapitan

If you want to publish a version of an app immediately (or before) the new system ships out, you have to work on Beta. Let's consider you are the developer of an interesting app with lots of paying users. Now consider you are waiting for the stable version. Now, when...

Can UIStackView also be used within a UITableViewCell?

ios,uitableview,autolayout,ios9,uistackview

Yes its possible. Take a look at the WWDC15 video. They demonstrate the use of a UIStackView within a UITableViewCell. It's around 5:00 WWDC 15 - Implementing UI Designs in Interface Builder...

iOS9 Untrusted Enterprise Developer with no option to trust

ios-enterprise,ios9

Go to Settings - General - Profiles - tap on your Profile - tap on Trust button.

Using the device simulator for iOS 8 with Xcode 7

ios8,xcode7,ios9

Xcode release note says below thing, Simulator Xcode 7.0 beta does not support iOS 8.4 and earlier simulator runtimes. (20699475) Refer this link for more info....

Deprecated: 'sendAsynchronousRequest:queue:completionHandler:' in iOS9

ios,objective-c,xcode,ios9

dataTaskWithRequest:completionHandler: is an instance method, not a class method. You have to either configure a new session or use the shared one: [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:ourBlock]; ...

Unwrapping a Int to String cast in Swift

ios,swift2,ios9

Try this: var highscore : NSNumber = self.sortedHighscores[indexPath.row]["Tijd"] as! NSNumber var a : String = String(format:"%d",highscore.integerValue) cell.detailTextLabel.text = a ...

Is it possible to opt your iPad app out of multitasking on iOS 9

ios,ipad,multitasking,ios9

You are actually have to adopt your app to a multitasking to get things working. According to WWDC 2015 video, to adopt your app for multitasking, you have to do 3 things: Build your app with iOS9 SDK Support all orientations Use Launch Storyboards So, if any of this is...

Install app on iOS without Apple Developer Program (Xcode 7)

ios9,xcode7

If you've previously enrolled in the Safari Developer Program you may find yourself to be an 'Agent' (see your account in Xcode preferences to verify this). Try logging in with another account, never used for development - create one if you must. Then you will appear as 'Free' and you...

NSURLConnection on iOS 9 does not use HTTP/2 protocol

ios,nsurlconnection,nsurlrequest,ios9,http2

HTTP/2 is only supported by NSURLSession. NSURLConnection has been deprecated in iOS 9. Here is the reference from the header: ...

iOS 9 UIButton Inititalization

swift,uibutton,ios9

The convenience initializer for UIButton has changed. convenience init(type buttonType: UIButtonType) Use: let btn = UIButton(type: UIButtonType.System)...

iOS9 ATS: what about HTML5 based apps?

cordova,https,sencha-touch,ios9

If you are not sure of which URL your application will connect or if you connect to many URLs, you can bypass the ATS by adding following keys in info.plist file. <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> ...

kCFStreamErrorDomainSSL, -9802 when connecting to a server by IP address through HTTPS in iOS 9

ios,iphone,afnetworking,ios9

iOS9 requires the server to only support TLSv1.2 and support perfect forward security. Also required is for the app to support IPV6 including not using hard-coded IP addresses. Suggested is to use NSURLSession. Otherwise exception additions must be made in the app plist. See the WWDC-15 session "Security and your...

iOS 9 not supported on Xcode 6.3

ios,xcode,ios9

If you installed iOS 9 beta onto your iPhone, then you cannot develop on it without Xcode 7. However, this is not a completely terrible thing; you can readily have both Xcode 7 and Xcode 6 on the same computer. What you cannot do is revert your iPhone back to...

iOS9 error on activityManager.startActivityUpdatesToQueue

ios,swift,core-motion,ios9

The problem is the data type CMMotionActivity? not CMMotionActivity! Here is something that should work for you: if(CMMotionActivityManager.isActivityAvailable()){ print("YESS!") self.activityManager.startActivityUpdatesToQueue(NSOperationQueue.mainQueue()) { data in if let data = data { dispatch_async(dispatch_get_main_queue()) { if(data.stationary == true){ self.activityState.text = "Stationary" } else if (data.walking == true){ self.activityState.text = "Walking" } else if (data.running...

What's the difference between a UIStackView And A UICollectionView in Xcode 7?

swift,user-interface,uicollectionview,ios9,uistackview

UICollectionView is like a grid, UIStackView is only for 1 dimension: vertical or horizontal. UICollectionView is like UITableView, but it supports more than single-column layouts. Collection views provide the same general function as table views except that a collection view is able to support more than just single-column layouts....

(ios9) HangTracer interval is 0, forcing to 1s, while using Contact Framework

ios,contact,ios9,xcode7

Debugging with a breakpoint on NSLog gives a call to [UIApplication startHangtracer:]. This occurs in the thread under HTStartHangTracing. Th fact that it occurs since iOS 9, and that it is from within UIApplication, gives me a strong feeling towards Apple's new bug reporting framework in iOS 9. This might...

How do I load an HTTP URL with App Transport Security enabled in iOS 9?

ios,url,nsurl,ios9

You can add exceptions for specific domains in your Info.plist: <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>testdomain.com</key> <dict> <key>NSIncludesSubdomains</key> <false/> <key>NSExceptionAllowInsecureHTTPSLoads</key> <false/> <key>NSExceptionRequiresForwardSecrecy</key> <true/> <key>NSExceptionMinimumTLSVersion</key> <string>TLSv1.2</string>...

UIProgressView Keeps Resetting to 0.0

ios,objective-c,uiprogressview,ios9

This is a bug in Xcode Version 7.0 beta (7A120f). I've confirmed it in both Objective C and Swift. It only occurs in the beta version, the same source executes correctly in Xcode 6. Very strange bug....

How to get monospaced numbers in UILabel on iOS 9

ios,uilabel,uifont,monospace,ios9

What about: let originalFont = UIFont.systemFontOfSize(17) let originalFontDescriptor = originalFont.fontDescriptor() let fontDescriptorFeatureSettings = [ [ UIFontFeatureTypeIdentifierKey: kNumberSpacingType, UIFontFeatureSelectorIdentifierKey: kMonospacedNumbersSelector ] ] let fontDescriptorAttributes = [UIFontDescriptorFeatureSettingsAttribute: fontDescriptorFeatureSettings] let fontDescriptor = originalFontDescriptor.fontDescriptorByAddingAttributes(fontDescriptorAttributes) let font = UIFont(descriptor: fontDescriptor,...

Fixing NSURLConnection Deprecation from Swift 1.2 to 2.0

swift,xcode7,swift2,ios9

(Repeating my arguments from http://stackoverflow.com/a/30670518/1187415:) Checking if a resource exists on a server requires sending a HTTP request and receiving the response. TCP communication can take some amount of time, e.g. if the server is busy, some router between the client and the server does not work correctly, the network...

Is it possible to programmatically force an ios ap in split view to go full screen in ios9?

objective-c,xcode,ipad,ios9,splitview

By-default, the video always get played in full-screen mode. When video playing is finished, the player gets dismissed and you will see your screen (from where you played the video). In your case, in split view controller. Do let me know if you need further details....

iPhone 5 displays black space in Xcode

ios,objective-c,iphone,xcode,ios9

Add a [email protected] launch screen image. It should be 640 × 1136 px

Find User Name or First/Last Name in iOS9 CloudKit / ABPerson (ABAddressBook)

abaddressbook,cloudkit,ios9,abperson

For iOS9, the new and best way to obtain user personal information is via Contact Framework The Contacts framework provides an Objective-C and Swift API to access the user’s contact information. Replacing ABAdressBook This framework is available on all Apple platforms and replaces the Address Book framework in iOS and...

Transport Security has Blocked a cleartext HTTP

ios,xcode,swift,ios9

See the developer forums: https://forums.developer.apple.com/thread/3544 Also this page: http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ For example you can add a specific domain like: <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>yourserver.com</key> <dict> <!--Include to allow subdomains--> <key>NSIncludesSubdomains</key> <true/> <!--Include to allow HTTP requests-->...

XCTest UI Record and Play - Simulator not updating UI

xctest,ios9,xcode7

I was able to fix the issue. The problem was, in the "deployment target" section in the main Application target, there are different columns for all the targets listed. For the Application's UI test target, the target was set to iOS8. Changed it to iOS9 and it started working....