I don't understand it either. As I mentioned, I was handed this project. I didn't create it or get it into this state myself.
Post
Replies
Boosts
Views
Activity
When I tried this, I found that whichever CBCentralManager I created second didn't work because the state was being reported as "Unsupported". Is there some trick to instantiating these objects to ensure they both work?
Does un-checking the "cleared for sale" checkbox do this? I am afraid to uncheck it. The language that appears there is ambiguous. It says, "If your in-app purchase is currently available for purchase, it will be removed from sale on the App Store". Does this mean my entire app will be removed from sale or just the IAP?Frank
Thanks. This is in fact what I am doing, and I think it works, but I still get a fairly regular stream of reports from customers with problems that seem to suggest files go missing for unknown reasons. I guess I'll keep looking for another explanation.
I was able to successfully create a new View that appears to behave normally with respect to Autolayout, but when I try to copy elements from my old views into it, there are problems:
First, the elements appear as white boxes with a blue border, with no visible content.
The copied elements themselves appear to have Autolayout disabled. I can add constraints to them, which then sets their layout to Constraints, but this does not fix their appearance.
Furthermore, even after adding good constraints, the position and size of the pasted elements doesn't change. I can't refresh the view in Interface Builder.
Please tell me there's something simple I can do to fix this. I really don't think it's fair that I would have to start over from scratch and build every UI element again by hand in a new project. The rest of my app works fine, it's just the views that need updating. I'm willing to do the work to add all the constraints, but if I have to actually start over with a new project and recreate each UI element by hand, it will be hundreds of hours of work.
Thanks,
Frank
OK, so I started down the road of just creating a new View from scratch, copying nothing from the old view.
I added three elements - A label, a button, and an image view, and set up the constraints. As I adjusted the last constraint, the Interface Builder view suddenly blanked out. All the subviews are now grey rectangles with a blue border, and even the shape of the top view has changed to a rectangle and no longer responds to changes in the Device selection.
Either this is some serious bug in Interface Builder or else it is due to something, some setting somewhere, in my old project that I can't see or control. This is really turning into a big problem for me. As it stands, I can't even rebuild my views from scratch.
I'm really stuck. Please help.
Interface Builder actually crashed. I didn't notice it until now.
There's a whole crash report with a backtrace, but the core problem seems to be:
"scale must be > 0"
Should I post the rest of the error?
Update: I tracked the problem down to images. Because it is very old, the project has images in the bundle that are not part of an Image asset. While the images still work when the app runs, Interface Builder fails to load them. After I moved the images to an Asset and updated all the UI elements that use them, the regular appearance of the elements was restored.
There is still one minor issue, though. I can't get Interface Builder to show me the layout on different devices. No matter which device I pick, I'm seeing a rectangular view that looks like an iPhone 5. I'd like to figure out what causes this. The problem does not occur if I create a new view from scratch, but I'd much rather start with my current views.
Update: I finally figured out the problem.
My "/usr/local/itms/bin" folder had a file called iTMSTransporter dated July 2008. Although my Mac is only a few months old, this file must have come across from my old Mac when I restored the Time Machine backup.
Deleting it fixed the problem.
I can add that the app connects with a server that we run, which has a valid SSL certificate.
One user who had this problem said "The iPads have the latest software updates installed (14.5.1) as well as the organisations SSL certificate as the error message indicates". I don't know what "organizations SSL certificate" he is referring to; it is not the SSL certificate on my server. Could some custom certificate he has on his device be interfering with its ability to use my server?
Yes this works, thanks. I guess range(of:) is an old NSString function that is available, but not documented in Swift.
I'm doing this layout within the context of a tableview cell, so I don't really have access to view controller events. As far as I know there's no opportunity within a table cell to take action after layout has occurred. The sizes of the UI elements if examined in awakeFromNib are the same as they are in the Nib file, which is not what they end up being after they are rendered within the tableview.
I also made sure to use the "conserve power" priority and the "background" notification type when posting the notification.
OK, well, I rebooted my phone on a whim, and now it's working.
Thanks for the response. This is certainly a disappointment. My goal is to count the number of floors a person can climb or descend within a time limit such as one minute. I was assuming that the pedometer would be able to give me fractional values instead of just whole numbers of floors.
I was also under the impression that these functions use the motion sensor rather than GPS to figure out what the person is doing.
Is there another way I can accomplish my goal? If I know that the person is climbing stairs, can I just use the step counter?
Frank