mardi 4 août 2015

Anyone else's Xcode 6.4 crashing after El Capitan beta 6?

I updated my computer to the latest beta that was released to developers last night and the same project that was compiling fine yesterday night now fails due to a supposed .xib/.storyboard error.

I have tried cleaning the project, downloading a previous version off of github, etc.. and yet the project still gives me the following error. "Failed to communicate with Interface Builder" as well as Command /Applications/http://ift.tt/1cExCL8 failed with exit code 255. Literally nothing was changed with the .storyboard file or anything remotely related to it.

What's more is that trying to open any .xib/.storyboard file (even the launch screen xib which I haven't touched leads to Xcode crashing which leads me to think this has nothing to do with me.)

Anyone else experiencing this? Any advice or temporary fixes?

Update: Trying to run anything on the simulator causes it to crash continuously or hang with the following error message: "Springboard quit unexpectedly"

Update 2: Playgrounds are unusable but do not crash. Also, these lads seem to be in the same boat as we are. http://ift.tt/1IE4Wxs

This is why we can't have nice things, Apple.



via Chebli Mohamed

AFNetworking caching using ETag

I have problem implementing caching using AFNetworking and ETag values. My server returns Cache-Control and ETag headers values for every request. But if I make a second request for the same resource AFNetworking won't add ETag. Should I manually save etag for each response I got and append it to next requests?

In app delegate I have set cache object:

 NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:20 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil];
 [NSURLCache setSharedURLCache:URLCache];

Also, I'm using default cache policy of AFHTTPRequestSerializer.

Any ideas what is the problem? Maybe I don't understand the idea of http caching. As far as I know it should be transparent, and all I have to do is to attach ETag and Cache-Control headers for every response.



via Chebli Mohamed

In app purchase not working after publishing iOS app to App Store

During development I've created test accounts which are able to obtain the price of the in app purchase as well as actually purchasing it without an issue. However after publishing the iOS app to App Store, the version of the app in App store can't even retrieve price of the product, and nothing shows up when I press the button to send the purchase request.

Uninstalling the app and redeploy the development version to the same device got it to work again.

What could be the problem? Is there a way to debug or see logs on the app store downloaded version? (iOS noob here)

Thanks!



via Chebli Mohamed

Auto-layout issue on scroll

I have .xib which has some auto-layout like so (might need to click to zoom): enter image description here

Nothing special, I have 13px spacing with the border of the superview. This xib is then loaded in the code into a tableViewCell.

I'm also setting the height in the viewDidLoad of the table like so:

[self.tableView setEstimatedRowHeight:40];
[self.tableView setRowHeight:UITableViewAutomaticDimension];

Now the fun begins. The auto-layout works when it wants to, and sometimes I scroll a cell out of view, bring it back and it's not the same size. See image below: enter image description here

Any ideas on what I am doing wrong?

PS: Not in the screengrab here, but I do have some cells with a lot of text that look like the same height of the big cell on left.



via Chebli Mohamed

Annotation pins and detail view from sqlite in Xcode

I've been looking around the internet to find a tutorial or something to explain this:
I need to show some pins on a map. I need to get them from a sqlite database (table with POI's name, lat, lon, and some text). They have to show annotations callouts with title and subtitle and open their detail views. All that with Xcode and Objective-C. How can I do that? Can anybody help and write the code?



via Chebli Mohamed

iOS autolayout issue

i am using xcode 6.4. i have a view controller named "sample".The view controller contain a scroll view.The scrollview contain another view(container view).The width of container view is thrice of the width of scrollview.when the scroll view is swiping right(or left) it must show the 3 parts of the container view.I did it using paging enabled property of UIscrollview(without auto-layout).But when using auto-layout i cant find a solution.Can anybody tell me a solution for this???please explain constraints for scroll view and container view.Can anybody upload a demo???



via Chebli Mohamed

Progress View and sound with Swift [on hold]

I have a mp3 file in the Supporting Files folder. I can make it play and stop. I put a Progress View from the Object Library to the Main.storyboard, but how to make the Progress View show the progress of the sound when the sound plays?

I would much appreciate if someone could introduce me to the more basics. (I am very new, any simple explanation will help)

var sound1 = AVAudioPlayer()
@IBOutlet var progress: UIView!

@IBAction func play(sender: AnyObject) {
    sound1.play()

}



via Chebli Mohamed