Posts

Post not yet marked as solved
5 Replies
8.9k Views
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
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
3 Replies
1.1k Views
I'm working on a BLE app with a hardware partner using samples of their device, which I am able to erase and re-flash when needed. When I try to use the device it initially works fine. I can connect to it, make requests, and get back responses. However, after a short time and a few successful runs, I start getting the error "Encryption is insufficient". The error is seen in the "didUpdateValueFor" function. I can still connect to the device, and enumerate all of its services and characteristics, but I can't read any data. If at this point I re-flash the device and also go into the iOS setting app and "forget" it, then I can use the device normally again, at least for a while. What causes this? Is there a way I can fix it in my app? Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
2 Replies
1.8k Views
I have chronic problems with the connection between Xcode and my phone. I plug the phone in and Xcode says "Waiting for phone to unlock", but the phone is already unlocked. I try locking and unlocking it, but nothing happens. If I can get past this problem by disconnection and reconnecting the phone a couple of times, it gets into the "downloading symbols" phase and never gets out of it. Finally, even though I have checked the "Connect via network" option, it never works, and I can never connect unless I plug in the phone with a USB cord (yes, the phone and the computer are on the same Wifi network). Some days this is just an annoyance, but some days (like today) I really need to test something on my phone for a customer who's waiting for it, and I cannot. The thing I'm trying to test involves sending text messages so I can't use the simulator or even an iPad. What can I do to debug this problem?
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
373 Views
I manage several different apps for different customers, who have invited me as a user to their Apple Developer accounts. This week a new customer invited me and I accepted the invitation. If I go to App Store Connect, I can select that customer, view the Users screen and see that he has given me Admin access which is what I requested. However, when I go to developer.apple.com/account, I cannot access the "Certificates, IDs & Profiles" section. In fact, I do not even see the new customer in the pick list underneath my name. This customer is non-technical and needs me to do everything involved with publishing his app, starting with creating the App Store listing and certificates. In App Store Connect I can "Add App" but there are no bundle IDs in the pick list. If I click the link that says "Register a new bundle ID" it takes me to the Certificates page but with a different customer's account selected. Why am I unable to do this given that I have Admin access? Is there some other way I can set up this app? Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
5 Replies
1.2k Views
I've been using Xcode and Objective-C for years, and rely heavily on the built-in documentation, which is for the most part good.There's an issue that's always bothered me. Today I was looking up a function called class_getName. I found its documentation page, and was also able to navigate to the page showing the overview of the runtime system, all of which is fine.When I typed "class_getName" into my program, the compiler immediately flagged it as an unknown symbol.I knew I probably had to include a header, but none of the documentation pages I looked at mentioned the name of the header file. I had to end up searching the internet for examples until I hit one that showed <objc/runtime.h> being imported.Why isn't this very small, simple and extremely useful bit of information included in the documentation?Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
7 Replies
30k Views
I've seen examples of Swift code with #if DEBUG / #endif, and have even used it myself.I know exactly how preprocessor macros work in c, c++ and Objective-C. In those languages, I know I can say:#ifdef DEBUG ... some code ...#endifAnd I know that if the DEBUG flag is false at build time, the code will not only not run, but it won't even be compiled. This is important to me because the code inside that block contains some sensitive information that must not end up in my compiled code for non-debug builds.In Swift, I'm really not sure what happens. I know the code doesn't execute, but I'm also told that Swift doesn't have a preprocessor. So, what exactly is going on here?Specifically, can I hide sensitive information inside an #if DEBUG block in Swift and be assured that it won't get compiled or in any way be present in the executable when the DEBUG flag is false? Or is #if DEBUG evaluated at runtime in Swift?Thanks,Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
439 Views
I have a table cell containing a UITextView. The table is using automaticDimension for the cell height and the cell itself is formatted in a way that the UITextView can be a variable height. The intention is that the textview and the cell should reisize as the user types and the text flows into additional lines. If I do nothing else, this doesn't happen. If I add a UITextViewDelegate and call sizeToFit() on the textview whenever the text changes, and then reload the table cell, it does resize, but it does so in an extremely sloppy and unusable way. Specifically, the textview loses focus, the cursor disappears, and the text starts to render in odd ways with overlapping characters or graphics from surrounding elements. What is the correct way to accomplish this? Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
2 Replies
849 Views
I want to send my app silent push notifications while it is running in the background, but I've been unable to get it to work. I understand how to send the notification by setting the content-available flag, and I've implemented the "didReceiveRemoteNotification" function in my app delegate. It works, but only if the app is open and running in the foreground. As soon as I put it in the background, didReceiveRemoteNotification doesn't get called again unless I reopen the app. I feel certain that I should be able to receive these notifications when my app is in the background. I have both "Remote notifications" and "Background processing" checked in Signing & Capabilities. Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
2 Replies
6k Views
A customer added me to their team today as a developer.When I sign in to App Store Connect, I can see and select their team from the list that appears under my name. However, when I open Xcode, the team doesn't appear under my Apple ID in Account Preferences or in the Team drop-down in the signing tab.I also noticed that even though I can select the team in App Store Connect, my name doesn't appear on the Users and Access screen. But I can see the app that I was assigned to work on.I tried closing and opening Xcode several times. I also removed and re-added my Apple ID.I waited several hours in case this was some sort of data propagation issue, but it hasn't resolved. What should I do next?Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
2 Replies
3.4k Views
Hi, My customer wants to do the thing where an app store URL is advertised which contains a referral code. When a user follows the link, it should take them to the app store to install the app, and then when the app is installed, it should be able to get access to the referral code in the original URL. I know such a thing was possible at one time because I remember talking to some of my colleagues about it, but I have never done it myself and whatever my coworkers did 8 years ago in Objective-C probably doesn't work anymore. Can someone let me know how to do this, or at least, let me know what the correct name for this procedure is so I can look it up? Thanks.
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
5 Replies
6.6k Views
Hi,How do I check to see if a Character is in a Character Set?In Objective-C, I could write:[[NSCharacterSet lowercaseLetterCharacterSet] characterIsMember:c]Where "c" is a variable of type char.In Swift, I tried to write:CharacterSet.lowercaseLetters.contains(c)Where "c" is of type Character, but I received an error saying that the function was expecting a parameter of type "Unicode.Scalar".Thanks,Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
4 Replies
11k Views
How do I get a background image to fill the screen in my launch screen on an iPhone X?I have aligned the image to the top and bottom layout guides, but this leaves large white gaps.
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
2 Replies
2.7k Views
Hi,I'm familiar with the "willTransition" method of view controllers that lets you detect when a transition to a new UITraitCollection is about to begin.What I need is a callback that happens after the transition is finished. There doesn't seem to be any "didTransition" method, nor any delegate property on the UIViewControllerTransitionCoordinator that I can use for this.How does one obtain this callback?Thanks,Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
8 Replies
13k Views
Hi,It seems like it's pretty easy to consume HTTP Live Streaming content in an iOS app. Unfortunately, I need to consume media from an RTSP server. It seems to me that this is a very similar thing, and that all of the underpinnings for doing it ought to be present in iOS, but I'm having a devil of a time figuring out how to make it work without doing a lot of programming.For starters, I know that there are web-based services that can consume an RTSP stream and rebroadcast it as an HTTP Live Stream that can be easily consumed by the media players in iOS. This won't work for me because my application needs to function in an environment where there is no internet access (it's on a private Wifi network where the only other thing on the network is the device that is serving the RTSP stream).Having read everything I can get my hands on and exploring third-party and open-source solutions, I've compiled the following list of ideas:1. Using an iOS build of the open-source ffmpeg library, which supports RTSP, I've come up with a test app that can receive the RTSP packets, decode them, create UIImages out of the frames, and display those frames on-screen. This provides a crude player, but performance is poor, most likely because ffmpeg can't take advantage of any hardware acceleration. It also doesn't provide me with any way to integrate the video stream into AVFoundation, so I'm on my own as far as saving the stream to a file, transcoding it, etc.2. I know that the AVURLAsset class doesn't directly support the RTSP scheme. Since I have access to the undecoded RTSP packets via ffmpeg, I've thought it should be possible to implement RTSP support myself via a custom NSURLProtocol, essentially fooling AVFoundation into reading those packets as if they originated in a file. I'm not sure if this would work, since the raw packets coming from the RTSP server might lack the headers that would otherwise be present in data being read from a file. I'm not even sure if AVFoundation would recognize my custom protocol.3. If a protocol doesn't work, I've considered that I might be able to implement my own local HTTP Live Streaming server that converts the RTSP packets into an HTTP stream that the media players can read. This sounds like a terribly convoluted solution to the problem, at best, and very difficult at worst.4. Going back to solution (1), if I could speed up the decoding by using some iOS CoreVideo function instead of ffmpeg, this solution might be okay. However, I can't find any documentation for CoreVideo on iOS (Apple only documents it for OS X).5. I'm certainly willing to license a third-party solution if it works well and provides good performance. Unfortunately, everything I've found so far is pretty crummy and mostly just leverages ffmpeg and/or VLC. What is most disappointing to me is that nobody seems to be able or willing to provide a solution that neatly integrates with AVFoundation. I really want to make my RTSP stream available as an AVAsset so I can use it with AVFoundation players and other classes -- I don't want to build an app that relies on custom third-party code for everything.Any ideas, tips, advice would be greatly appreciated.Thanks,Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
3 Replies
665 Views
I'm trying to save a Dictionary to UserDefaults. My Dictionary is defined as [String:Data]. Since both String and Data are property objects, I expected this to work, but it doesn't: my app blows up with a "this class is not key-value coding compliant" error. Is this a bug, or am I doing something wrong?
Posted
by flarosa.
Last updated
.