Search results for

DTiPhoneSimulatorErrorDomain Code 2

158,641 results found

Post

Replies

Boosts

Views

Activity

Reply to Can watchOS send a local notification?
I just found out about the WatchConnectivity Framework: https://developer.apple.com/library/prerelease/watchos/documentation/WatchConnectivity/Reference/WatchConnectivity_framework/index.html#//apple_ref/doc/uid/TP40015269The Watch Connectivity framework (WatchConnectivity.framework) provides a two-way communications conduit between an iOS app and a WatchKit app on a paired Apple Watch. Apps use this framework to pass files and data back and forth. Live communication is possible when both apps are active; otherwise, you send data in the background so that it is available when the other app launches.So yes, you can request pedometer data from the Watch app in the background!
Topic: App & System Services SubTopic: General Tags:
Jun ’15
Reply to What is OCR Accessory Setup?
When user setup the accessory (HMHome addAccessory), instead of an alert window asking for pin code, user now get this (https://dl.dropbox.com/s/g0dc76dnsqg8t51/img-1928.png)There are specific information about how HomeKit accessory should display the setup code (Self-cert), please refer to MFi portal for detailed informaion.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to How to print Swift 2.0 iBook
I would kill for a paper copy. I remember asking about a paper copy of the Cocoa docs back when WWDC actually had feedback forums (remember those). They asked the audience how many people would buy a set, and other then myself, there was maybe one or two other hands in a full room. I guess I'm just getting old in that I like reading technical documents on paper. Oh well.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Abort trap: 6
I'm getting an Abort Trap: 6 after bringing in over a project from XCode 6.3. Here's what I'm getting in 7.0:CompileSwift normal x86_64 /Users/mike/Cocoa/BitBucket/bassoon-fingerings-3.0/Bassoon Fingerings/MusicStaffView/MusicStaffViewElementLayer.swift cd /Users/mike/Cocoa/BitBucket/bassoon-fingerings-3.0 /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/mike/Cocoa/BitBucket/bassoon-fingerings-3.0/Bassoon Fingerings/MusicStaffView/MusicStaffViewElement.swift /Users/mike/Cocoa/BitBucket/bassoon-fingerings-3.0/Bassoon Fingerings/MusicStaffView/MusicStaffView.swift /Users/mike/Cocoa/BitBucket/bassoon-fingerings-3.0/Bassoon Fingerings/NotePickerViewController.swift /Users/mike/Cocoa/BitBucket/bassoon-fingerings-3.0/Bassoon Fingerings/FingeringViewController.swift -primary-file /Users/mike/Cocoa/BitBucket/bassoon-fingerings-3.0/Bassoon Fingerings/MusicStaffView/MusicStaffViewElementLayer.swift /Users/mike/Cocoa/BitBucket/bassoon-fingerings-3.0/Ba
10
0
4.3k
Jun ’15
Reply to in-app purchase
There are two questions in your question:1) can I use a system other than IAP to allow users to make purchases?2) if I can, can I use that system within the app.The answer to #1 depends on what you are selling. Apple requires the use of IAP for use of code that they distribute but not for real world goods sold using an app that they distribute. This is explained in the guidelines with an interesting exception in 11.14.If the use of a non-IAP system is allowed, then the answer to whether that system can be imbedded in the app depends on how Apple is interpreting 11.2. One way it can be interpreted is that you can't have that system in an App. This interpretation is supported by the requirements in 11.14. But another way to interpret 11.2 is that the system can be in the app, just the stuff bought (content, functionality, or services) can't be used in the app. Here is the ambiguous 11.2: 11.2 Apps utilizing a system other than the In-App Purchase API (IAP) to purchase content, functio
Topic: App & System Services SubTopic: StoreKit Tags:
Jun ’15
Reply to Swift 1.2 and Swift 2 in the same project?
You could try updating the other code yourself, since you have the source?Switching to Swift 2.0 will probably throw up a lot of errors and warnings, but most issues that need fixing tend to be simple repetitive changes that the migrator probably could have handled (changing var to let, updating the old generic functions to be called as methods, etc).It might not be very difficult at all, and when those other people update their code, you can always just swap it in.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to Abort trap: 6
The offending code is in this file and is commented out in this version (lines 25-34):class MusicStaffViewStaffLayer: CAShapeLayer { var maxLedgerLines : Int = 0 var currentHorizontalPosition : CGFloat { get { if let sublayers = self.sublayers! as? [CALayer] { if let lastElement = sublayers.last as CALayer! { return lastElement.frame.origin.x + lastElement.frame.size.width } } return 0 } } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) strokeColor = UIColor.blackColor().CGColor } override init() { super.init() strokeColor = UIColor.blackColor().CGColor } /* override var path : CGPath? { get { return staffPath() } set { } } */ func staffPath() -> CGPathRef { let staffLines = UIBezierPath() let spaceWidth : CGFloat = self.bounds.size.height / (6.0 + 2.0 * CGFloat(maxLedgerLines)) self.lineWidth = spaceWidth / 10.0 for i in 1...(5 + maxLedgerLines) { if (i <= maxLedgerLines || i > 5 + maxLedgerLines) { continue } let height = self.bounds.origin.y + spaceWidth * CGFloat(i)
Jun ’15
Reply to Multiple auto-renewable subscriptions
I will leave it to others to respond how you might do this with autorenewables. I will just point out that:1) it's real easy with non-renewing subscriptions. You open up additional subscription options if the user has already purchased a few worlds. You can determine the overlap interval and create all kinds of interim options.2) how many of your users do you really hope to fool into renewing automatically who would not renew through a non-renewing subscription - renewal takes all of 30 seconds once every month.3) you could sell Tokens and exchange those tokens for various periods/worlds4) Apple has said that autorenewables are really for episodic content that changes with the renewal period (e.g. monthly magazines) so they may well reject any autorenewable system you devise for this purpose.
Topic: App & System Services SubTopic: StoreKit Tags:
Jun ’15
Reply to Cross in-app purchase subscription
You wrote:I would like to allow the user pay for its subscription via website, or app.Questions:1 - Am I obligated to use In-App Purchase ?2 - If not, may I ask the user Credit Card inside my app ?3 - If not, may I send the user to webpage to fill billing information ?4 - If I'm obligated to use IAP, how can I recover its subscription in my site ?If the subscription will be unlocking some code within the app you must use IAP. Once the user has made the purchase the app can send some signal to your website indicating that the purchase has been made.On the other hand, if the app is just a window to your website and the subscription does not unlock stuff in the app then you do not need to use IAP. Whether or not you can use a credit card within the app depends on an interpretation of 11.2 - it's not clear. You may send the user to your website for billing information. And finally, read 11.14 - it may move you into the 'does not need to use IAP' category.
Topic: App & System Services SubTopic: StoreKit Tags:
Jun ’15
Can't fetch JSON due to NSInvalidArgumentException
Hey guys,since NSURLConnection is deprecated in iOS 9, I'm trying to replace it with the recommended NSURLSession. When the completion handler of my NSURLSessionDataTask is getting called my app terminates due to an uncaught exception 'NSInvalidArgumentException' – the reason: 'data parameter is nil'. Of course a corrupt URL can be the reason for this error, but I've already checked that. Now, let me show you my code:- (void)downloadItemsWithQuery:(NSString *)searchString { NSString *theQuery = [searchString uppercaseString]; NSString *encodedString = [theQuery stringByAddingPercentEncodingWithAllowedCharacters: [NSCharacterSet characterSetWithCharactersInString:@!*'();:@&=+$,/?%#[]]]; NSURL *theURL = [NSURL URLWithString:[NSString stringWithFormat: @http://alexpoets.com/VPlan/service.php?klasse=%@, encodedString]]; NSURLSessionDataTask *dataTask = [[NSURLSession sharedSession] dataTaskWithURL:theURL completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { _downloadedData = [[
13
0
3.9k
Jun ’15
Strong reference cycle in a closure
I've thought whole day but don't get it: why the following code doesn't cause strong reference cycle?class C { var m: () -> () = {} init?() { println(init) } deinit { println(deinit) } } var ci = C() ci?.m = { println(ci) } ci = nilIn fact, ci has a strong reference to m which has a strong reference to ci.. but the output is:> init > deinit
3
0
520
Jun ’15
Printing optional strings in Swift
It seems that (in Swift 2, at least), printing optionals no longer prints a tidy result (nil or the value of the string), but rather printsString: Optional(Hello, playground)Is there no succinct way of printing the contents of an optional as either nil or whatever the string value is?
0
0
109
Jun ’15
Urgent: All my provisioning profiles suddenly expired and all apps stopped working
I signed in this morning to developer.apple.com to find that I need to sign some contract with the new terms of service. I couldn't even access most of the site before I signed it. So I did.After that I visited my provisioning profiles section https://developer.apple.com/account/ios/profile/profileList.action?type=production to find that all my provisioning profiles have become expired.Also my apps already on the appstore started crashing. They crash upon launching. Currently none of my users are able to use the app unless they redownload the app from the appstore. I don't know why it works if you redownload it, but I am guessing it has something to do with the provisioning profile issue since:1. this issue is not unique to one app2. I didn't even submit a new version. The apps were running perfectly fine until a few days ago.3. I tried renewing one of the provisioning profiles for a test app and rebuilt it, and the test app started working again.Right now I don't know what I am supposed to do. My users aren'
3
0
1.7k
Jun ’15