Post

Replies

Boosts

Views

Activity

IAP Sandbox user: iTunes account creation not allowed
Currently unable to test IAP with sandbox users. I have tried using existing accounts and also setup new sandbox users from scratch but still get the following error when trying to make a purchase:iTunes account creation not allowedThe Apple ID cannot be used with the itunes store at this time. Please try again later.I can confirm that I am not signed into any accounts under Settings > iTunes. I have created new sandbox testers with unique email addresses and tried both a) verifying a new account email address/security questions and b) not verifying email addresses. Neither of which make a difference.Looking at the System Status (https://developer.apple.com/system-status/) there was an issue last night (18/07/17) with the iTunes Sandbox but is apparently resolved - please can someone confirm this is now working for other users or is it actually broken for others still?
8
0
11k
Jul ’17
Disk not ejected properly
Since upgrading my iMac to High Sierra Beta I somtimes got the 'Disk not ejected properly' from my Thunderbolt 2 raid (still HFS filesystem).After now connecting my USB 2 external disk to back up after about a minute or two it started to constantly connect and disconnect (Hole list of "Disk not ejected properly" in notifications).Connecting both disk to my Sierra MacBook Pro does not show this behavior. Any idea what is triggering this?
53
1
84k
Jul ’17
Update UIDragPreview during DragInteraction
Hey,during my drag, I need to update the UIDragPreview of the dragged item depending on it's location. I'm currently doing that by setting a new previewProvider each time the preview needs to be updated. When doing this, the current preview gets scaled down a little bit and the new one scales up, which looks a bit weird.Is there a better way to update the DragPreview? Or is there at least a way to get rid of the scaling?Best,Klemens
2
0
1k
Aug ’17
EAAccessory support over Lighting Audio Module in iOS 11 is unstable
I have noticed various strange behaviours with the EAAccessory interface on iOS 11 (Betas 5 and 6 **update and now in the full production version 11.0.2 **)). I wonder if anyone else has had these issues? Everything worked OK on iOS 10.I am communicating with an accessory over a lightning socket (via a LAM), and get the following behaviour:1. Connecting to a device, EAAccessoryManager returns a connected EAAccessory (an EASession can be established, and data received, although this doesn't always happen), but then immediately disconnects from the EAAccessory, and then returns another connected EAAccessory.2. After opening an EASession on this new EAAccessory, no communications to the device is possible (sending data over the OutputStream doesn't result in the data getting to the accessory)3. On switching away from the app and back again, either:a) the app crashesorb) the input stream reports endEncountered and the output stream just seems to stop working, it never reports hasSpaceAvailable again.Some simplified code which illustrates this problem is below:import UIKitimport ExternalAccessoryclass ViewController: UIViewController, StreamDelegate { var connectedAccessory: EAAccessory? var eaSession: EASession? let supportedProtocolName = "My.Supported.Protocol" @IBOutlet weak var logTextView: UITextView! @IBOutlet weak var sendButton: UIButton! override func viewDidLoad() { super.viewDidLoad() log("loaded") // Do any additional setup after loading the view, typically from a nib. NotificationCenter.default.addObserver( forName: NSNotification.Name.EAAccessoryDidConnect, object: nil, queue: nil, using: accessoryConnected) NotificationCenter.default.addObserver( forName: NSNotification.Name.EAAccessoryDidDisconnect, object: nil, queue: nil, using: accessoryDisconnected) EAAccessoryManager.shared().registerForLocalNotifications() // Maybe we're already connected if let connectedAccessory = EAAccessoryManager.shared().connectedAccessories.first { self.connectedAccessory = connectedAccessory openSession() } } private func accessoryConnected(_ notification: Notification) { log("accessoryConnected") for accessory in EAAccessoryManager.shared().connectedAccessories { log("accessory: \(accessory)") log("") } // Connect to the first one (only expect there to be one for this test) self.connectedAccessory = EAAccessoryManager.shared().connectedAccessories.first openSession() } private func openSession() { guard let connectedAccessory = self.connectedAccessory else { return } self.eaSession = EASession( accessory: connectedAccessory, forProtocol: self.supportedProtocolName) openStream(eaSession?.inputStream) openStream(eaSession?.outputStream) } private func openStream(_ stream: Stream?) { stream?.delegate = self stream?.schedule(in: RunLoop.current, forMode: RunLoopMode.defaultRunLoopMode) stream?.open() } public func stream(_ stream: Stream, handle streamEvent: Stream.Event) { switch streamEvent { case Stream.Event.openCompleted: log("\(stream) openCompleted") if (eaSession?.inputStream?.streamStatus == Stream.Status.open && eaSession?.outputStream?.streamStatus == Stream.Status.open) { log("both input and output are open") } case Stream.Event.hasBytesAvailable: log("hasBytesAvailable") readAll() case Stream.Event.hasSpaceAvailable: log("hasSpaceAvailable") case Stream.Event.errorOccurred: log("\(stream) errorOccurred") closeSession() case Stream.Event.endEncountered: log("\(stream) endEncountered") closeSession() default: log("\(stream) default") closeSession() } } private func readAll() { let bufferSize = 128 var numberOfBytesRead = 0 repeat { var buffer = [UInt8](repeating: 0, count: bufferSize) numberOfBytesRead = eaSession!.inputStream!.read(&buffer, maxLength: buffer.count) if (numberOfBytesRead > 0) { log("read:\(buffer)") } } while (numberOfBytesRead == 128) } @IBAction func sendDataButtonPressed(_ sender: UIButton) { sendData() } private func sendData() { let data: [UInt8] = [1, 0, 0, 0, 16, 0, 0, 0, 0, 3] log("Sending: \(data)") self.eaSession?.outputStream?.write(data, maxLength: data.count) } private func closeSession() { closeStream(eaSession?.inputStream) closeStream(eaSession?.outputStream) eaSession = nil } private func closeStream(_ stream: Stream?) { stream?.close() stream?.remove(from: RunLoop.current, forMode: RunLoopMode.defaultRunLoopMode) stream?.delegate = nil } private func accessoryDisconnected(_ notification: Notification) { log("accessoryDisconnected") for accessory in EAAccessoryManager.shared().connectedAccessories { log("accessory: \(accessory)") log("") } guard let accessory = notification.userInfo?[EAAccessoryKey] as? EAAccessory else { return } log("disconnected accessory: \(accessory)") log("") closeSession() } private func log(_ msg: String) { self.logTextView.insertText("\(msg)\n") scrollLogToEnd() } private func scrollLogToEnd() { let stringLength = self.logTextView.text.characters.count self.logTextView.scrollRangeToVisible(NSMakeRange(stringLength - 1, 0)) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. }}
9
0
15k
Aug ’17
memory issues since iOS 11 or iOS 10.3
Hi,I have an App that is using geofencing and beacons since about one year in the app store. Recently I noticed more and more crashes and users are reporting of missing notifications upon geofence entry or exit ( I send a local notification upon entry or exit).so i suspect those crash reports are related to those user reports. The crash reports indicate memory management issues: lib dispatch.dylib _dispatch_callblock_and_releaseThese problem only occur since iOS 10.3. So I have some reports with iOS 10.3 but most of them with iOS 11. When I run the app in the simulator the memory usage is at around 50MB and does not increase. Even when I simulate geofence entry and exit etc it stays around the 50 MB usage.So my first question is it possible that the app crashes when not in foreground when it uses only 50MB?To investigate further I implemented the function func applicationDidReceiveMemoryWarning(_ application: UIApplication)And send a local notification when it get´s called. And indeed sometimes I sometimes get this warning and I myself have irregularities with the geofence enter and exit notifications.Now to further investigate I installed another App to monitor the same geofence (IFTTT). Here too I have irregularities with the geofence enter and exit notifications.Until now I was quite relaxed as I was sure it´s the early iOS 11 beta´s that have memory management issue. But i´m using the latest Beta (15A5372a) and I guess we are close to the final now. Also what worries me is that some users experience these issues also with iOS 10.3.Any ideas how to investigate this further or does anybody experience something similar?Very BestStephan
5
0
4.0k
Sep ’17
HTTP Status cod 403 with client certificate authentication
Hi,I would like to ask one question in regards to HTTP status code 403 request with client certificate authentication challenge.So, I was implementing a solution that requires mutusl TLS which will set the delegate responded to the client identity authentication challenge, and experienced the issue when the request fails with 403, the iOS SDK returns the error NSURLErrorClientCertificateRequired rather than the error that was actually returned from the server side.I found the thread in the forum that explains the exactly the same issue, but would like to clarify few more things here.From my experiment, what I found is that this behaviour only happens for the first 5 or 10 minutes of NSURLSession's session.For example, I will get the NSURLErrorClientCertificateRequired only for the first five or ten minutes, and after that, I am receiving the expected error message from the server side.This reminds me of TLS caching issue back in iOS 9 or below with NSURLConnection and NSURLSession (which resolves by re-contructing NSURLSession object); however, in this case, it is not simple to reconstruct the NSURLSession object based on the response from the server side.Was this officially reported or known to Apple as a bug? or is this kind of expected behaviour? Is there any official statement from Apple acknowledging this issue (like known-issues)? Can you help me direct to places where I can find this information, if any?Thanks,
3
0
4.6k
Oct ’17
Got a serious NSURLSession background session bug
When a batch of download tasks create and resume, some of them are still downloading. Xcode kill the app, and launch app again, then all the tasks failed immediately(if not reproduce, retry these steps). The worst thing is whenever i add new tasks and resume, all of them failed immediately, until i restart the app.I can produce this bug everytime, just follow these tips:NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:@"***"];NSOperationQueue* operationQueue = [[NSOperationQueue alloc] init];operationQueue.maxConcurrentOperationCount = 1;urlsession = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:operationQueue];for (int i = 0; i < 100; i++){ NSURLSessionDownloadTask* downloadTask = [urlsession downloadTaskWithRequest:urlRequest]; [ downloadTask resume];}Xcode kill the app...Xcode launch app again...The only delegate method be called immediately is:- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)errorError Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={NSErrorFailingURLKey=xx'xx'x'xxxx, NSErrorFailingURLStringKey=***}It's not certain appearing on devices not kill by xcode, but my QA colleagues sometimes got this bug and report to me.Only background session has this bug, defaultSessionConfiguration won't happen.I don't know why "No such file or directory" error is called back, any suggestions?
14
0
5.2k
Oct ’17
Time to get NFC Apple Wallet Cert
HiHow long does it take to get an NFC Certificate from Apple? So that we can delivery NFC Enabled Loyalty Passes.We registered at the following address but haven't received any communication for over 2 weeks.https://developer.apple.com/contact/passkit/We are developing solutions for our clients and need to test the technology.We use different PassTypeIDs for each of our Customers so it's likely we will need a different NFC certificate for each of our customers.How do we get NFC Certificates in bulk so that we can deliver NFC Loyalty Programmes to our Customers?Thanks
11
0
9.3k
Nov ’17
Cannot connect to iTunes Store
- My app’s binary is Rejected.- My In-App Purchases (IAP) is Waiting for Review.- In-App Purchase (IAP) is enabled in developer’s account- Restore purchase works in the sandbox environment- Some purchases works in the sandbox environment.When I try to create SKProductsRequest for some purchases, as a result I have "Error Domain=SSErrorDomain Code=109 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store, SSErrorHTTPStatusCodeKey=404}". But it works for some purchases. And also all my purchases have status "Waiting for Review". How to fix this?
9
0
5.1k
Nov ’17
Universal links on redirection
I know that universal links were not working on redirection prior to some of the recent ios 11 version. I mean the following use case:1) having app that handles domain: "www.testdomain.com" universally.2) user clicks email tracking link (i.e. "http://tracking.com/someparameter") -> safari is opened.3) tracking page is the auto-redirected into universally supported link: "www.testdomain.com/somepage".But it seems like with one of the latest iOS update, universal links are now working on redirect.I could not find any official docs around universal links on redirect, so is it how universal links behave? If so, since what version is that enabled? Thank you,Alexey
3
0
13k
Nov ’17
Rules for "promo codes"?
I've always understood it to be the case that apps could permit users to log in or use a code to access paid content, as long as the app did not direct the user to an external web site to make a purchase. For example, apps like Netflix or Kindle.My app isn't even doing anything close to this. I have an app in which digital content is unlocked via in-app purchase. Occasionally I give away promo codes that allow a user to unlock one free piece of content. These codes can only be used once, and are distributed in very limited numbers on cards, in person, at events like trade shows.My app has been in the store for about four years using this method. This week I attempted to publish a small bug-fix update, and was flagged by Apple and told that my use of Promo Codes in this manner violates the rules.What happened here? Did Apple misunderstand what my app is doing? Did the rules change recently and I was unaware of the change? Has this always been against the rules, but either Apple didn't enforce it before or they never reviewed my app thorougly enough to find it?Thanks,Frank
5
0
9.2k
Nov ’17
Clustering stop working after removing all annotations
Hi!I noticed a strange behavior on MapKit when using the iOS 11 clustering feature.If you add some annotations on a map (with same clusteringIdentifier and same displayPriority) MapKit will correctly merge together annotations that are close.The problem is that if you remove all the annotations and then you add them back the map will no more merge the annotation together. It’s like the clustering feature simply stop working.I don’t really know if it is a bug or if I miss something.Someone else have noticed this?Alan
6
0
4.9k
Dec ’17
EAAccessoryManager notifyObserversThatAccessoryDisconnectedWithUserInfo crashes iOS 11.1.2
App is crashing while a bluetooth device is disconnected. I've seen few related threads and they say "A notification delegate was not reset to nil. A fix has been applied at version 10.3.79."Following is crash log:Triggered by Thread: 0 Thread 0 name: Thread 0 Crashed: 0 libobjc.A.dylib 0x000000018544c430 objc_msgSend + 16 1 ExternalAccessory 0x000000019c07c4dc -[EAAccessoryManager _notifyObserversThatAccessoryDisconnectedWithUserInfo:] + 104 (EAAccessoryManager.m:909) 2 ExternalAccessory 0x000000019c07eddc -[EAAccessoryManager _externalAccessoryDisconnected:] + 928 (EAAccessoryManager.m:1537) 3 CoreAccessories 0x00000001a7892ccc __54-[ACCExternalAccessoryProvider ExternalAccessoryLeft:]_block_invoke + 316 (ACCExternalAccessoryProvider.m:453) 4 libdispatch.dylib 0x0000000185b6d088 _dispatch_call_block_and_release + 24 (init.c:994) 5 libdispatch.dylib 0x0000000185b6d048 _dispatch_client_callout + 16 (object.m:502) 6 libdispatch.dylib 0x0000000185b79b74 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1016 (inline_internal.h:2500) 7 CoreFoundation 0x0000000186191eb0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1815) 8 CoreFoundation 0x000000018618fa8c __CFRunLoopRun + 2012 (CFRunLoop.c:3111) 9 CoreFoundation 0x00000001860affb8 CFRunLoopRunSpecific + 436 (CFRunLoop.c:3245) 10 GraphicsServices 0x0000000187f47f84 GSEventRunModal + 100 (GSEvent.c:2245) 11 UIKit 0x000000018f6842e8 UIApplicationMain + 208 (UIApplication.m:3949) 12 MYAPP 0x0000000100ab8d58 main + 172 (main.m:16) 13 libdyld.dylib 0x0000000185bd256c start + 4
7
1
2.3k
Dec ’17
Voip Push notifications missed delay
Hi all,In our application we Use VoIP Type push notifications to give a heads-up for the mobile phone.This allows the mobile phone to:1) If the application is killed, start it in background2) If the application is in Background, start running the application statemachine3) If the Phone is in deep sleep, Wake up and start the application in BackgroundDue to the above, our application arrives in a state where we can receive an incoming voip Call.It has been observed that there is a delay in the push notification arrival at the mobile phone.Delayed arrival/delivery of Push notification has been measured of about 6 sec or sometimes never arrives.This espicially is the case when we have an iPhone without sim-card.Note :- This was tested on a controlled setup with large number of iterations with good WiFi and internet connectiviy)- We ensured during testing that the push was actually dispatched to APNS.It is unknown as to what exactly causes a variation in the arrival of the voip notification.Can someone explain why :- Voip messages arrive late depite they should be 'instant' ?- What could explain the difference in measurments with/without sim card ?Best regards.
6
0
6.5k
Jan ’18
On FTP
Questions about FTP crop up from time-to-time here on DevForums. In most cases I write a general “don’t use FTP” response, but I don’t have time to go into all the details. I’ve created this post as a place to collect all of those details, so I can reference them in other threads. IMPORTANT Apple’s official position on FTP is: All our FTP APIs have been deprecated, and you should avoid using deprecated APIs. Apple has been slowly removing FTP support from the user-facing parts of our system. The most recent example of this is that we removed the ftp command-line tool in macOS 10.13. You should avoid the FTP protocol and look to adopt more modern alternatives. The rest of this post is an informational explanation of the overall FTP picture. This post is locked so I can keep it focused. If you have questions or comments, please do create a new thread with the Network tag and I’ll respond there. Don’t Use FTP FTP is a very old and very crufty protocol. Certain things that seem obvious to us now — like being able to create a GUI client that reliably shows a directory listing in a platform-independent manner — are not possible to do in FTP. However, by far the biggest problem with FTP is that it provides no security [1]. Specifically, the FTP protocol: Provides no on-the-wire privacy, so anyone can see the data you transfer Provides no client-authenticates-server authentication, so you have no idea whether you’re talking to the right server Provides no data integrity, allowing an attacker to munge your data in transit Transfers user names and passwords in the clear Using FTP for anonymous downloads may be acceptable (see the note below) but most other uses of FTP are completely inappropriate for the modern Internet. IMPORTANT You should only use FTP for anonymous downloads if you have an independent way to check the integrity of the data you’ve downloaded. For example, if you’re downloading a software update, you could use code signing to check its integrity. If you don’t check the integrity of the data you’ve downloaded, an attacker could substitute a malicious download instead. This would be especially bad in, say, the software update case. These fundamental problems with the FTP protocol mean that it’s not a priority for Apple. This is reflected in the available APIs, which is the subject of the next section. FTP APIs Apple provides two FTP APIs: All Apple platforms provide FTP downloads via NSURLSession Most Apple platforms (everything except watchOS) support CFFTPStream, which allows for directory listings, downloads, uploads, and directory creation. All of these FTP APIs are now deprecated: NSURLSession was deprecated for the purposes of FTP in the 2022 SDKs (macOS 13, {i{,Pad},tv}OS 16, watchOS 9) [2]. CFFTPStream was deprecated in the 2016 SDKs (macOS 10.11, {i{,Pad},tv}OS 9). CFFTPStream still works about as well as it ever did, which is not particularly well. Specifically: There is at least one known crashing bug (r. 35745763), albeit one that occurs quite infrequently. There are clear implementation limitations — like the fact that CFFTPCreateParsedResourceListing assumes a MacRoman text encoding (r. 7420589) — that will not be fixed. If you’re looking for an example of how to use these APIs, check out SimpleFTPSample. Note This sample has not been updated since 2013 and is unlikely to ever be updated given Apple’s position on FTP. The FTP support in NSURLSession has significant limitations: NSURLSession only supports FTP downloads; there is no support for uploads or any other FTP operations NSURLSession does not support resumable FTP downloads [3] NSURLSession background sessions only support HTTP and HTTPS, so you can’t run FTP downloads in the background on iOS If Apple’s FTP APIs are insufficient for your needs, you’ll need to write or acquire your own FTP library. Before you do that, however, consider switching to an alternative protocol. After all, if you’re going to go to the trouble of importing a large FTP library into your code base, you might as well import a library for a better protocol. The next section discusses some options in this space. Alternative Protocols There are numerous better alternatives to FTP: HTTPS is by far the best alternative to FTP, offering good security, good APIs on Apple platforms, good server support, and good network compatibility. Implementing traditional FTP operations over HTTPS can be a bit tricky. One possible way forward is to enable DAV extensions on the server. FTPS is FTP over TLS (aka SSL). While FTPS adds security to the protocol, which is very important, it still inherits many of FTP’s other problems. Personally I try to avoid this protocol. SFTP is a file transfer protocol that’s completely unrelated to FTP. It runs over SSH, making it a great alternative in many of the ad hoc setups that traditionally use FTP. Apple does not have an API for either FTPS or SFTP, although on macOS you may be able to make some headway by invoking the sftp command-line tool. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" [1] In another thread someone asked me about FTP’s other problems, those not related to security, so let’s talk about that. One of FTP’s implicit design goals was to provide cross-platform support that exposes the target platform. You can think of FTP as being kinda like telnet. When you telnet from Unix to VMS, it doesn’t aim to abstract away VMS commands, so that you can type Unix commands at the VMS prompt. Rather, you’re expected to run VMS commands. FTP is (a bit) like that. This choice made sense back when the FTP protocol was invented. Folks were expecting to use FTP via a command-line client, so there was a human in the loop. If they ran a command and it produced VMS-like output, that was fine because they knew that they were FTPing into a VMS machine. However, most users today are using GUI clients, and this design choice makes it very hard to create a general GUI client for FTP. Let’s consider the simple problem of getting the contents of a directory. When you send an FTP LIST command, the server would historically run the platform native directory list command and pipe the results back to you. To create a GUI client you have to parse that data to extract the file names. Doing that is a serious challenge. Indeed, just the first step, working out the text encoding, is a challenge. Many FTP servers use UTF-8, but some use ISO-Latin-1, some use other standard encodings, some use Windows code pages, and so on. I say “historically” above because there have been various efforts to standardise this stuff, both in the RFCs and in individual server implementations. However, if you’re building a general client you can’t rely on these efforts. After all, the reason why folks continue to use FTP is because of it widespread support. [2] To quote the macOS 13 Ventura Release Notes: FTP is deprecated for URLSession and related APIs. Please adopt modern secure networking protocols such as HTTPS. (92623659) [3] Although you can implement resumable downloads using the lower-level CFFTPStream API, courtesy of the kCFStreamPropertyFTPFileTransferOffset property. Revision History 2024-04-15 Added a footnote about FTP’s other problems. Made other minor editorial changes. 2022-08-09 Noted that the FTP support in NSURLSession is now deprecated. Made other minor editorial changes. 2021-04-06 Fixed the formatting. Fixed some links. 2018-02-23 First posted.
0
0
4.4k
Feb ’18