While programming in XCode 8.2.1, I am simply trying to perform the following action:
... but when I try to do this (either by using the mouse/menu, or using the shortcut: "Control-Shift-Command-Left Arrow") , I get the unexpected result of the "Funk" alert sound... and no folding/unfolding takes place.
I have researched the question but all other posts are outdated.
Is this a known bug or am I just doing something wrong?
Thankyou!!!!
Related
I used to use the userDistanceToManeuverLocation variable from the RouteStepProgress Class but this seems to just return nil recently.
Just in case I was doing something wrong I tried following the MapBox iOS nav tutorial (https://docs.mapbox.com/help/tutorials/ios-navigation-sdk/) but this had the same result.
Going by the MapBox tutorial I would do the following to get the variable:
let navigationViewController = NavigationViewController(for: directionsRoute!)
let distance = navigationViewController.navigationService.routeProgress.currentLegProgress.currentStepProgress.userDistanceToManeuverLocation
I don't seem to see any error messages or other concerns. I would get this variable on every tick of the users location but now just returns nil. Thanks for any help
So after some testing I figured out the issue is to do with the newer versions of MapBox Navigation (SDK MapboxNavigation). Anything from version 0.29.0 onwards causes issues. For now I'm sticking with version 0.28.0 and will have to report this to MapBox
Edit:
It looks like the latest version (MapboxNavigation 0.38.0 at the time of writing this edit) appears to provide a solution. I now use distanceRemaining found in the RouteProgress class which does the same thing.
What is the latest way to set/activate email, phone, or postalAddress in IOS > 11?
I tried scrolling through the methods and attributes and came up with the following: paymentRequest.shippingType
Here is the old way:
paymentRequest.requiredShippingAddressFields = [.phone, .email, .postalAddress]
I would like to understand if there is a way to write the code that is easier than the old way and doesn't cause a warning.
It’s been replaced by requiredShippingContactFields.
https://developer.apple.com/documentation/passkit/pkpaymentrequest/2865927-requiredshippingcontactfields
requiredShippingAddressFields is deprecated, use requiredBillingContactFields instead.
For more info: documentation.
I downloaded Apple's SceneKit sample code (fox.swift) and opened it up on Xcode 8 beta 6.
It asked me to convert the code to Swift 3, which I did.
When I try to run the code on my phone I receive the errors:
Value of type ‘SCNNode’ has no member ‘run’
Value of type ‘SCNNode’ has no member ‘add’
Sample lines where the error occurs:
cameraYHandle.run(actionY)
self.cameraYHandle.add(cameraYAnimation, forKey: nil)
This leads me to three questions:
1) Are the functions 'run' and 'add' gone on SCNNode for Swift 3?
2) If so, what should I replace them with?
3) If so, if so, why didn't Xcode's converter handled them already?
Thank you for your time :)
PS.: It runned well for Mac using Xcode 7.3.
As dan commented, these translations resulted in a code without errors:
run => runAction
add => addAnimation
play => playAudio
so,
cameraYHandle.run(actionY) becomes cameraYHandle.runAction(actionY)
and so on.
Thank you, Dan.
I'm using a dictionary to evaluate an expression, when the expression has variables and the dictionary is actually used by NSExpression, something happens and I get EXC_BAD_ACCESS when trying to update the dictionary, this only happens when debugging in an iPhone6, not in the simulator and not in an iPhone 4S.
let strExpression = "a+b+20"
let exp = NSExpression(format:strExpression)
self.dictionary = ["a":10.0, "b":15.0, "c":25.0]
let value:AnyObject = exp.expressionValueWithObject(self.dictionary, context: nil)
let doubleValue = value as Double
self.dictionary.updateValue(doubleValue, forKey: "c")
Something really weird is that if i add this line just after creating the dictionary, then it woks fine:
let newDic = self.dictionary
I,m using iOS 8.1. Thanks in advance!
With #bensarz comment, I thought it might be helpful for others searching for answers if I put the response into an actual answer instead of a comment.
Per #LeeWhitney's response on a similar post:
Looks like a compiler bug.
Have you tried switching between Release and Debug then rebuilding? If debug works but not release it can be an indication of a compiler/optimizer bug.
Does it happen in the simulator also?
Your code works for me on iOS 8.1 with XCode 6.1.
Solution:
The issue seems to be solved by changing the 'Optimization Level' under the 'Swift Compiler - Code Generation' to 'None'. The issue seems to be with the 'Fastest' Compiler optimization level.
Also, a work around that I've found original before the compiler change:
If you use a let statement prior to assigning values in the dictionary, it seems to alleviate the issue. More information found at link below:
EXC_BAD_ACCESS on iOS 8.1 with Dictionary
I'm using enumerateBodiesAlongRayStart and this method constantly prints the word "Chance" to my console. Is there any way to suppress this? Whats the deal?
self.gameScene.physicsWorld.enumerateBodiesAlongRayStart(self.rayStart, end: self.rayEnd, usingBlock: {
body, point, normal, stop in
})
I have the same "problem". It seems to be a debug output in /Applications/Xcode6-Beta6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhysicsKit.framework/PhysicsKit. Hopefully it will be removed in beta7.
Edit by gfrs: Not removed. Currently exists in Xcode 6 GM.
Edit 2 by gfrs: Still not fixed. Currently exists in Xcode 6.1