Posts

Post not yet marked as solved
0 Replies
107 Views
I'm trying to add an image in UIImage format to SpritKit's SKSpriteNode. When converting a UIImage into a texture to SKTexture and adding it to SKSpriteNode, the image that takes into account the orientation of the image held by the UIImage is not displayed on the screen. I tried the code below, but the result is identical. Code1: let image: UIImage? let texture: SKTexture = SKTexture(image: image!) ver imageNode = SKSpriteNode(texture: texture) Code2: let image: UIImage? let cgImage = image?.cgImage let ciImage = CIImage(cgImage: cgImage!) let orientedImage = UIImage(cgImage: CIContext(options: nil).createCGImage(ciImage, from: ciImage.extent)!, scale: 0, orientation: image!.imageOrientation) let texture: SKTexture = SKTexture(image: orientedImage) ver imageNode = SKSpriteNode(texture: texture) Code3: let image: UIImage? guard let cgImage = image?.cgImage else { return } let orientedImage = UIImage(cgImage: cgImage, scale: image!.scale, orientation: .up) let texture = SKTexture(image: orientedImage) ver imageNode = SKSpriteNode(texture: texture) Is there a way to ensure that the image orientation is taken into account when displayed?
Posted
by mario25.
Last updated
.
Post not yet marked as solved
0 Replies
723 Views
The App Store Review Guidelines have been updated with the new addition of 2.5.18. Updated agreements and guidelines now available Added to 2.5.18: “Apps that contain ads must also include the ability for users to report any inappropriate or age-inappropriate ads.” How is it best implemented? Will the user report to the developer via the app, or will the system report directly to the ad serving company via the app? Is it mandatory to attach a screenshot of the screen containing the ad in question? Is it enough just to have a function to report by email to the developer? Need the ability for users to report issues directly from the screen where the ad is displayed?
Posted
by mario25.
Last updated
.
Post not yet marked as solved
4 Replies
1.3k Views
Getting an attribution from Apple Weather and accessing the Apple Weater trademark returns a 403 status. https://weather-data.apple.com/assets/branding/combined-mark-light.png Display of the Apple Weater trademark is a prerequisite for using Apple Weather. I am concerned that when this situation occurs during the review of an app submitted to Apple, the review will be rejected.
Posted
by mario25.
Last updated
.
Post marked as solved
7 Replies
2.6k Views
Even if I start a request for SKProductsRequest, didReceiveResponse, didFailWithError, and requestDidFinish are not called. The first request successfully called didReceiveResponse and requestDidFinish. However, didReceiveResponse, didFailWithError, and requestDidFinish are not called in the second and subsequent requests. About 12 hours after the second request, when I started the request again, didReceiveResponse and requestDidFinish was called normally. However, when I started the request immediately afterwards, didReceiveResponse, didFailWithError, and requestDidFinish were no longer called again. I kept the SKProductsRequest as a strong reference and executed the start of the request. https://developer.apple.com/documentation/storekit/skproductsrequest Objective-c Code: //SKProductsRequest request @property (strong, nonatomic) SKProductsRequest *request; _request = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:_productIdentifiers]]; _request.delegate = self; [_request start]; - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { } - (void)requestDidFinish:(SKRequest *)request { } - (void)request:(SKRequest *)request didFailWithError:(NSError *)error { } - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions { } The following log is displayed in the console log of Xcode. [BackgroundTask] Background Task 8 ("SKProductsRequest"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this. This phenomenon occurred in the following operating environment. Xcode 13.0 iPhone 11 Pro / iOS 15.0 Deploy target iOS 13.0 SAND-BOX        This phenomenon did not occur in the following operating environment. Xcode 12.5.1 iPhone 11 Pro / iOS 14.5 Deploy target iOS 12.3 SAND-BOX This method is called after all processing of the request has been completed. Typically, subclasses of SKRequest require the delegate to implement additional methods to receive the response. When this method is called, your delegate receives no further communication from the request and can release it. https://developer.apple.com/documentation/storekit/skrequestdelegate/1385532-requestdidfinish The documentation states that the request can be released after the delegate is called. What does that mean? Is this the phenomenon that the next request is not processed until the unreleased request expires?
Posted
by mario25.
Last updated
.
Post not yet marked as solved
0 Replies
1.4k Views
UIToolBar is used to display multiple UIBarButtonItems on UINavihgationBar.The code below worked correctly in apps before iOS12.This code is executed with viewDidLoad. // note UIBarButtonItem *noteButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemCompose target:self action:@selector(noteViewAction)]; // camera UIBarButtonItem *cameraButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemCamera target:self action:@selector(cameraViewAction)]; cameraButton.tintColor = [UIColor colorWithRed:19/255.0 green:144/255.0 blue:255/255.0 alpha:1.0]; // spacer UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; space.width = 50.0; // Toolbar UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 300.0f, 44.0f)]; toolbar.autoresizingMask = UIViewAutoresizingFlexibleHeight; toolbar.items = [NSArray arrayWithObjects:space, noteButton, space, cameraButton, nil]; toolbar.backgroundColor = [UIColor clearColor]; [self.navigationItem setTitleView:toolbar];When running on Xcode11 beta and iOS13.0 beta 8 and iOS13.1 beta, UIBarButtonItem is displayed for the first time, but when you return to the original screen by displaying the next screen, or when using UIAlertController, The UIBarButtonItem is deleted.When UIBarButtonItem was deleted, the following message was displayed in the console log.UINavigationItemBugOnIos13[219:2900] [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( "", "", "", "", "", "<nslayoutconstraint:0x28019d180 'ib_leading_leading'="" h:|-(16)-[_uimodernbarbutton:0x1028326d0] ="" (active,="" names:="" '|':_uibuttonbarbutton:0x1028324f0="" )="">", "<nslayoutconstraint:0x28019dc20 'ib_leading_leading'="" h:|-(="">=10)-[_UIModernBarButton:0x102833fe0] (active, names: '|':_UIButtonBarButton:0x102833e00 )>", "<nslayoutconstraint:0x28019d1d0 'ib_trailing_trailing'="" h:[_uimodernbarbutton:0x1028326d0]-(="">=11.5)-| (active, names: '|':_UIButtonBarButton:0x1028324f0 )>", "<nslayoutconstraint:0x28019dc70 'ib_trailing_trailing'="" h:[_uimodernbarbutton:0x102833fe0]-(16)-| ="" (active,="" names:="" '|':_uibuttonbarbutton:0x102833e00="" )="">", "<nslayoutconstraint:0x28019e580 'uisv-canvas-connection'="" uilayoutguide:0x281bbb8e0'uiviewlayoutmarginsguide'.leading="=" uiview:0x102922550.leading ="" (active)="">", "<nslayoutconstraint:0x28019e620 'uisv-canvas-connection'="" uilayoutguide:0x281bbb8e0'uiviewlayoutmarginsguide'.trailing="=" uiview:0x102922830.trailing ="" (active)="">", "<nslayoutconstraint:0x28019e9e0 'uisv-spacing'="" h:[uiview:0x102922550]-(0)-[_uibuttonbarbutton:0x1028324f0] ="" (active)="">", "<nslayoutconstraint:0x28019e940 'uisv-spacing'="" h:[_uibuttonbarbutton:0x1028324f0]-(0)-[uiview:0x1029226c0] ="" (active)="">", "<nslayoutconstraint:0x28019e990 'uisv-spacing'="" h:[uiview:0x1029226c0]-(0)-[_uibuttonbarbutton:0x102833e00] ="" (active)="">", "<nslayoutconstraint:0x28019e8f0 'uisv-spacing'="" h:[_uibuttonbarbutton:0x102833e00]-(0)-[uiview:0x102922830] ="" (active)="">", "<nslayoutconstraint:0x28019a7b0 'uiview-leftmargin-guide-constraint'="" h:|-(0)-[uilayoutguide:0x281bbb8e0'uiviewlayoutmarginsguide'](ltr) ="" (active,="" names:="" '|':_uibuttonbarstackview:0x1028284b0="" )="">", "<nslayoutconstraint:0x28019a850 'uiview-rightmargin-guide-constraint'="" h:[uilayoutguide:0x281bbb8e0'uiviewlayoutmarginsguide']-(0)-|(ltr) ="" (active,="" names:="" '|':_uibuttonbarstackview:0x1028284b0="" )="">" ) Will attempt to recover by breaking constraint Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful.This is a likely bug for IOS13, so we have filed a bug report (FB6940927).Currently, the latest beta version of iOS13 is iOS13.1 beta, but if iOS13 beta8 is shipped as GM version of iOS13.0, this bug will remain included.To make matters worse, this also affects apps built for iOS12 that are being developed with Xcode10.In other words, among the apps currently distributed on the App Store, this bug appears when an app that has UIToolbar set to UINavigationBar is run under iOS13.If this bug has been resolved in the iOS13 GM version, you don't need to worry about this, but if the bug is included, you need to consider a workaround.This is a ridiculous workaround, but instead of running with viewDidLoad, run it with viewWillAppear and redraw the NavigationBarItem when using UIAlertController or returning to the original screen.Are there other good workarounds?
Posted
by mario25.
Last updated
.