Post

Replies

Boosts

Views

Activity

App Won't Compile with Embedded Third Party Framework: Could not install at this time. Failed to load Info.plist from bundle at path
So, I'm getting this error when trying to run the app. "Build succeeds" but the app won't run and Xcode spits out an error:Could not install at this time.Failed to load Info.plist from bundle at pathAnd the path points to a 3rd party framework I use, pointing to its Info.plist: Extra info about plist: ACL=<not found>.If I choose "Do Not Embed" in the "Frameworks, Libraries, and Embedded Content" section of Xcode, the app build & runs. But if I choose "Link and Embed" the app, I get this error and the app won't run.Obviously, if I'm shipping the app to the App Store I need to embed the 3rd party framework in the application...Upon further inspection, if I look inside the .framework of the third party library it does not include an Info.plist file. Never had an issue related to this third party framework before. It's the GoogleMobileAds.framework...
10
0
18k
Dec ’21
StoreKit Testing Not Working for Existing macOS App. Receipt Validation Fails and gives me App Sandbox Receipt
I tried adding StoreKit testing for an existing macOS app. On first launch, there is no App Store receipt on the main bundle and therefore my app calls exit(173) to get a receipt, and I get an App Store sign in sheet. Then when I sign in, I have a receipt that does not validate. I believe I'm simply getting an App Store receipt in the sandbox environment? I was under the impression that using StoreKit testing would allow me to test iAP in a local environment. Here is my steps to reproduce: 1) Added the Configuration.storekit file to my project. 2) Set this file as the storekit configuration in the scheme editor. 3) Run the app. 4) Local receipt validation fails, macOS gives me a Mac App Store login prompt, which I can use but then I get a sandboxed App Store receipt on the main bundle. Receipt will not verify against StoreKitTestCertificate.cer. I'm running Xcode 12.3. I'm on Big Sur. My app's deployment target is 10.11. Any ideas? Thanks
2
1
1.4k
Apr ’22
Subscription Renewal Rate in StoreKit Testing for Xcode Not Working For Subscriptions Unless They Are Monthly Subscriptions?
I'm unable to test Subscription renewal via StoreKit Testing in Xcode unless the subscription is a monthly subscription. I'm trying to test a weekly subscription but under the Editor menu there is no entires for anything other than Monthly? (Xcode 13.3). Setting the interval to the fastest ("Monthly Renewal Every 30 Seconds") does nothing if the active subscription is a weekly subscription. Is there no way to test subscriptions unless they are monthly?
2
0
2.4k
May ’22
Subscriptions Status Stuck "Developer Action Needed" "Submit for Review" button grayed out in App Store Connect. Cannot submit revised app.
I have an iOS app that was rejected and I submitted a revised binary. In my case auto-renewable subscriptions were returned with the initial rejections and I didn't realize I had to add them for review again with my revised submission....so I submitted a revised binary which got rejected because the subscriptions were returned on the initial rejection. So I go to "Subscriptions" area for my app and the status is "Developer Action Needed." If I click a subscription the "Submit for Review" button is disabled. I tried making an edit to the Subscription to see if that would cause the button to become enabled but it does not. Can't figure out how I can resubmit these subscriptions for review....so my submission is stuck... Perhaps when an app with attached iAP/Subscriptions is rejected they shouldn't detach iAP/subscriptions from the app? Developers can easily not notice and submit a new build and not realize that their iAP/subscriptions are no longer attached to the build...and if App Review doesn't notice you could have an app get on the Store which potentially shows UI for non-working iAP/subscriptions. If anyone has ran into this and could help I'd appreciate it. Thanks a lot.
2
0
1.8k
Jul ’23
iPhone 14 Pro in Landscape Mode: UIView to UIImage using UIGraphicsBeginImageContextWithOptions generates clipped image. Image is Fine on iPhone 13 Pro Max
Testing on the iPhone 14 Pro simulator I notice if the device is in the landscape orientation, snapshot images my app takes are clipped (the x origin is off). I take a snapshot of a view like this: -(UIImage*)getSnapshotForView:(UIView*)snapShotView {  UIGraphicsBeginImageContextWithOptions(snapShotView.bounds.size, NO, 0.0f); [snapShotView drawViewHierarchyInRect:snapShotView.bounds afterScreenUpdates:YES]; UIImage *snapShotImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return snapShotImage; } So I have an iPhone SE 3rd gen and all is working fine. But I figured I'd test in the iPhone 14 Pro simulator. When the simulator is in landscape mode the generated image is inset like 100 points on the x origin and the content is clipped off on the right side. So I looked at the view I was snapshotting and I thought I wasn't accounting for safe area insets properly (right and left) but I was. The subviews of the view I'm snapshotting all have the expected CGRect value for their frames. Looks like iPhone 14 Pro is rendering snapshots location on the x axis when the device is in landscape mode (at least that appears to be the case in the simulator at least). Any ideas if I'm doing something wrong?
2
0
1.4k
Sep ’22
UICollectionView List Style on Mac Catalyst: Prevent the Collection View From Changing the Selection when the Selected Row's Parent is Collapsed?
I'm using UICollectionView with a list style on Mac (looks like NSOutlineView in a sidebar). I have expandable rows. So this is the behavior I'm after: -If the user has a row selected, but decides to collapse the selected row's parent, I want to maintain the current selection. Instead this is what happens by default: -If a row selected and I collapse the parent the collection, the collection view automatically selects another row (in my case the first row at index path 0-0). Just because the user collapses the parent doesn't mean the selection should change. For instance in Xcode's Navigator I can have a file selected in a Group and collapse the group without modifying the current selection.
2
0
617
Oct ’22
WKWebView on Mac causes Autolayout Crash After Exiting Full screen Video
I configured a WKWebView to support full screen elements like this:  WKWebViewConfiguration *webViewConfig = [[WKWebViewConfiguration alloc]init]; WKPreferences *prefs = [[WKPreferences alloc]init];  prefs.elementFullscreenEnabled = YES;  webViewConfig.preferences = prefs; //Create a WKWebView with the configuration and load a url like Youtube that supports playing videos in full screen.... Then I run the app and play a YouTube video. I enter full screen. Then I exit full screen and I hit an Autolayout crash. 0 libobjc.A.dylib 0x188365820 objc_msgSend + 32 1 CoreAutoLayout 0x1904ed82c -[NSLayoutConstraint _layoutEngine] + 36 2 CoreAutoLayout 0x1904ee3c0 __55+[NSLayoutConstraint _addOrRemoveConstraints:activate:]_block_invoke + 160 3 CoreAutoLayout 0x1904d4514 -[NSISEngine withBehaviors:performModifications:] + 88 4 CoreAutoLayout 0x1904ee238 +[NSLayoutConstraint _addOrRemoveConstraints:activate:] + 308 5 WebKit 0x1a82777fc -[WKFullScreenWindowController finishedExitFullScreenAnimationAndExitImmediately:] + 936 6 WebKit 0x1a7d63868 -[WKFullScreenWindowController windowDidExitFullScreen:] + 44 7 CoreFoundation 0x1887a6560 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 148 8 CoreFoundation 0x188844044 ___CFXRegistrationPost_block_invoke + 88 9 CoreFoundation 0x188843f8c _CFXRegistrationPost + 440 10 CoreFoundation 0x188777b64 _CFXNotificationPost + 708 11 Foundation 0x18966738c -[NSNotificationCenter postNotificationName:object:userInfo:] + 88 12 AppKit 0x18c4a3210 -[NSWindow(NSFullScreen) _didExitFullScreen] + 336 13 AppKit 0x18c2aa3ac -[_NSExitFullScreenTransitionController _doAfterExitFullScreen] + 304 14 AppKit 0x18c2acb28 ___NSRunLoopTimerCreateWithHandler_block_invoke + 56 15 CoreFoundation 0x1887cb54c CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 32 16 CoreFoundation 0x1887cb1f4 __CFRunLoopDoTimer + 940 17 CoreFoundation 0x1887cad4c __CFRunLoopDoTimers + 356 18 CoreFoundation 0x1887b0734 __CFRunLoopRun + 1896 19 CoreFoundation 0x1887af878 CFRunLoopRunSpecific + 612 20 HIToolbox 0x191e8ffa0 RunCurrentEventLoopInMode + 292 21 HIToolbox 0x191e8fde4 ReceiveNextEventCommon + 672 22 HIToolbox 0x191e8fb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72 23 AppKit 0x18ba3584c _DPSNextEvent + 632 24 AppKit 0x18ba349dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728 25 AppKit 0x18ba28e0c -[NSApplication run] + 464 26 AppKit 0x18ba00250 NSApplicationMain + 880 27 AppKitWKWebviewProjectForWebInspector 0x102fbbf80 main + 44 (main.m:14) 28 dyld 0x1883a7e50 start + 2544
2
0
790
Feb ’23
Uploading App Preview Video for Mac App Fails with Error "Your app preview contains unsupported or corrupted audio" even though the video contains no audio.
Uploading an App Preview Video for a Mac App Fails with Error "Your app preview contains unsupported or corrupted audio" even though the video contains no audio. Anyone run into this and know of a workaround? I filed FB12151982
2
3
2.7k
Jun ’23
Is there a way to know if UISheetPresentationController is currently being resized by the user?
I’m using UISheetPresentationController with a UIViewController. While the sheet is being resized I’d like to position certain subviews a certain way during the resizing event. For example I may hide some subviews on a smaller detent and unhide them on a larger detent. But while the sheet is being resized in between the small and large detent I’d like to have some subviews placed at certain locations of the view hierarchy. As far as I can tell the only way to do this is with unreliable hard coded values: -(void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; CGFloat currentHeight = self.view.bounds.size.height; if (currentHeight <= mediumDetent) { [self doLayoutForMediumDetent]; } else if (currentHeight >= fullSizeDetent) { [self doLayoutForFullSizedDetent]; } else { [self doLayoutInBetweenFullAndMediumSheetWithCurrentSize:currentHeight]; } } I don't really know for sure the height of the detents. I'm using estimates so this layout code is fragile. For the medium detent the documentation states that it is "A system detent for a sheet that is approximately half the height of the screen, and is inactive in compact height." but on certain devices the medium detent height is not exactly 1/2 the screen height. Ideally it would be nice to have API like this: -(void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; CGFloat mediumHeight = [self.sheetPresentationController resolvedHeightForDetentWithIdentiier:someID withTraitCollection:self.traitCollection]; CGFloat fullHeight = [self.sheetPresentationController resolvedHeightForDetentWithIdentiier:FullSizeID withTraitCollection:self.traitCollection]; if (self.sheetPresentationController.isInLiveResize) { //do whatever during live resize } else { //do whatever at the current size } } Is there currently a better way to achieve what I'm after?
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
526
May ’23
WKContentRuleList JSON file documentation? "trigger" vs "condition"?
I'm having a hard time finding samples that clearly explain how to use WKContentRuleList objects. I read that WKContentRuleList use the same format as Safari content blocker extensions however when I try to compile a content blocker from the sample app AdoptingDeclarativeContentBlockingInSafariWebExtensions it complains about missing a "trigger". I get Error Domain=WKErrorDomain Code=6 "(null)" UserInfo={NSHelpAnchor=Rule list compilation failed: Invalid trigger object.} When I try to use the rules from the AdoptingDeclarativeContentBlockingInSafariWebExtensions sample project: [ { "id": 1, "priority": 1, "action": { "type": "block" }, "condition": {"regexFilter": ".*", "resourceTypes": [ "image" ] } }, { "id": 2, "priority": 1, "action": { "type": "allow" }, "condition": {"regexFilter": "wikipedia", "resourceTypes": [ "image" ] } } ] So if WKContentRuleList requires different keys/value pairs than Safari content blockers are those differences documented anywhere? I can't really find any good info on this. Thanks in advance.
Topic: Safari & Web SubTopic: General Tags:
2
0
804
Jun ’23
Jump to Definition on Symbols in a Swift Framework's Gigantic Generated "Header"?
So I'm looking inside the documentation for TipKit, which ~1400 lines in a single file of documentation. If I right click a symbol there is no "Jump to Definition" in the context menu. Steps to reproduce: Navigate to TipKit generated "header". Right click a symbol like Tip (highlighted in bold): public struct AnyTip : Tip 3rd step) No Jump to Definition menu item appears in the context menu. Is this intentional behavior?
2
0
662
Oct ’23
Use prebuilt dylib built for macOS in macCatalyst?
Is there a way to link a prebuilt dylib that was built for the 'macOS' platform on Mac Catalyst without being warned by Xcode? Generally it would be better to just recompile for Mac Catalyst but this is a third party library and they have a complicated build system with dozens of dependencies that doesn't support Mac Catalyst as of now (although they have iOS and Mac 'regular'). So I would have to spend quite a bit of time trying to sort through their build system to make a Catalyst version myself. The library uses no platform specific UI code and I'm fairly certain that macOS build would work just fine on Mac Catalyst without any changes since it isn't UI related at all. It seems to work fine (apart from Xcode warning me about linking a .dylib built for macOS on Mac Catalyst). I could shim all this away in a NSBundle that is aware of the AppKit world but then I have to make all method calls to the third party framework on Mac Catalyst through the bundle and it would separate my iOS and Catalyst code relying on the same implementation which isn't great. Is there a way I could just replace the 'macOS' platform in the .dylib with macCatalyst to get rid of the warning?
2
1
1.6k
Nov ’23
NSWindow Suddenly Closes After NSTextField Ends Editing (By Clicking into Another NSTextField)
Configuration: I have a NSTextField (multiline) inside an NSWindow. I have another NSTextField (single line) inside an NSBox (which is in the same window). The multiline text field is first responder and is editing. I click on the single line text field inside the NSBox to edit that one. The NSWindow just closes. This is on Sonoma 14.2.1. I subclassed NSWindow and override the close method and put a breakpoint. Here's the call stack that leads to the window suddenly closing: #1 0x0000000189c73d90 in -[NSWindow __close] () #2 0x000000032343 in -[NSApplication(NSResponder) sendAction:to:from:] () #3 0x0000000189b543ac in -[NSControl sendAction:to:] () #4 0x0000000189b542f0 in __26-[NSCell _sendActionFrom:]_block_invoke () #5 0x0000000189b54218 in -[NSCell _sendActionFrom:] () #6 0x0000000189b5413c in -[NSButtonCell _sendActionFrom:] () #7 0x0000000189c4c508 in __29-[NSButtonCell performClick:]_block_invoke () #8 0x0000000189c4c264 in -[NSButtonCell performClick:] () #9 0x0000000189b545a8 in -[NSApplication(NSResponder) sendAction:to:from:] () #10 0x0000000189b543ac in -[NSControl sendAction:to:] () #11 0x0000000189befb48 in -[NSTextField textDidEndEditing:] () #12 0x0000000__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ () #13 0x000000018625c65c in ___CFXRegistrationPost_block_invoke () #14 0x000000018625c5a4 in _CFXRegistrationPost () #15 0x00000001861971dc in _CFXNotificationPost () #16 0x0000000187289ff0 in -[NSNotificationCenter postNotificationName:object:userInfo:] () #17 0x0000000189bef754 in -[NSTextView(NSSharing) resignFirstResponder] () #18 0x0000000189a9fab8 in -[NSWindow _realMakeFirstResponder:] () #19 0x0000000189b4f18c in -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] () #20 0x0000000189ada79c in -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] () #21 0x0000000189ada45c in -[NSWindow(NSEventRouting) sendEvent:] () #22 0x000000018a1879f4 in -[NSApplication(NSEventRouting) sendEvent:] () #23 0x0000000189dd6908 in -[NSApplication _handleEvent:] () #24 0x00000001899a1d74 in -[NSApplication run] () The mouse click is no where near the close button in the title bar.
2
0
779
Feb ’24