Posts

Post marked as solved
7 Replies
2.1k Views
Some terminology first:Publisher device - device publishing the NSNetService in the local. domainBrowser device - device browsing for service with NSNetServiceBrowser in the local. domainThe issue:NSNetServiceBrowserDelegate's didRemoveService is not being called on the browser device when both the publisher and the browser device are connected to the same router and thepublisher device goes off the grid by enabling Airplane mode (I think turning WiFi off will also work). When the publisher and the browser are not connected to the router but are communicating directly (peer-to-peer), the issue doesn't reproduce.The problem is easily reproducible with the Apple's WiTap samplecode application (that is no longer exists in Apple's sample code 😟, but can be found on the net).Steps to reproduce:1. Connect the application to the same router2. Run the WiTap application on both devices3. Turn airplane mode on publisher deviceResult:The browser device still displays the publisher servicePublisher codeNSNetService *server = [[NSNetService alloc] initWithDomain:@"local." type:@"_myservice._tcp." name:@"my-id" port:0]; server.includesPeerToPeer = YES; server.delegate = self; [server publishWithOptions:NSNetServiceNoAutoRename|NSNetServiceListenForConnections]; self.server = server;Browser codeNSNetServiceBrowser *browser = [[NSNetServiceBrowser alloc] init]; browser.includesPeerToPeer = YES; browser.delegate = self; [browser searchForServicesOfType:@"_myservice._tcp." inDomain:@"local."]; self.browser = browser;Any ideas & suggestions will be highly appreciated!TL;DRI suspect that the problem is not directly related to NSNetService but rather related to Bonjour implementation. The reason I think so is that after force closing the browser app and re-running it (while the publisher device is still in Airplane mode), the browser devicestill shows the service as a result of the didFindService delegate method being called for a service that the publisher doesn't publish anymore.P.S. The issue reproduces on iOS 12 and below (tested down to iOS 7).Thanks.
Posted Last updated
.
Post not yet marked as solved
3 Replies
5.7k Views
When the following message shows up Device "device-name" isn't registered in your developer account The device must be registered in order to be included in a provisioning profile. there is a "Register Device" button. Does it require Admin role to register the device?
Posted Last updated
.
Post not yet marked as solved
1 Replies
499 Views
I searched for Apple guidelines/documentation that indicate when submission of iOS apps with XCFrameworks (instead of the fat frameworks) to AppStore will become mandatory but I didn't find any. Did I miss it or Apple never stated when it will become mandatory?
Posted Last updated
.
Post not yet marked as solved
0 Replies
525 Views
I am getting a weird behavior with a navigation app I am developing. After more or less fixed amount of time (initial period) running in background in which the consumption was P percents per hour, the battery consumption increases drastically - same P percents are now consumed every 15 minutes versus every hour or so during the initial period.I am able to reproduce this behavior on various devices ranging from iPhone 6 to iPhone X running different iOS versions with a bare simple app that can be simplified to:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self startLocationUpdates]; return YES; } - (void)startLocationUpdates { self.locationManager = [[CLLocationManager alloc] init]; [self.locationManager requestAlwaysAuthorization]; self.locationManager.delegate = self; self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; //kCLLocationAccuracyThreeKilometers;; self.locationManager.distanceFilter = kCLDistanceFilterNone; //1000.0f; self.locationManager.pausesLocationUpdatesAutomatically = NO; self.locationManager.activityType = CLActivityTypeAutomotiveNavigation; self.locationManager.allowsBackgroundLocationUpdates = YES; [self.locationManager startUpdatingLocation]; } - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations { self.lastLocationUpdateTimestampLabel.text = [self.dateFormatter stringFromDate:[NSDate date]]; }I am getting the following results from the tests I conducted:with location settings configured to max precision: 1% during the first 45-80 minutes (initial period), then 1% every 15 minuteswith location settings configured to lowest precision: 1% during the first 3-5 hours (initial period), then 1% every 40-50 minutesReseting RAM (as described in various places on the internet) reverts the behaviors to the starting point (regular consumption during the initial period).Did anyone encountered similar battery consumption pattern when using location updates? Maybe during some other activity?
Posted Last updated
.
Post not yet marked as solved
0 Replies
392 Views
Is it feasible to develop a simple 2D game (Minesweeper, Tetris, ...) using TVMLKit? Obviously the user should be able to control the game using the AppleTV remote's D-pad.From the docs:The TVMLKit framework enables you to evaluate TVMLKit JS and TVML files from within your tvOS app. You can create TVML elements, styles, views, and view controllers through the JavaScript environment.It isn't clear (to me) if TVMLKit can be used to implement dynamic content (rather than TVML templates).
Posted Last updated
.