Post

Replies

Boosts

Views

Activity

Shape animation works in SwiftUI but not when embedded in UIKit
The title pretty much says everything, and the easiest would be to check the code example. See on GitHub here - https://github.com/quentinfasquel/swiftui-animation-issue Just change complexShape: false for true line 103 in ViewController.swift, the SwiftUI live preview works properly but when running the app, the SwiftUI View is embedded in a UIView and the animation won't work. Obviously 'withAnimation' isn't called from UIKit and that could be the problem, but a simple shape is animated properly... any expert @ Apple could help out here ?
0
0
732
Sep ’20
Swift Package dynamic linking with static xcframework
Bonjour everyone, I would love some help, or just your insight... I was given a version of CouchbaseLite as a fat framework and I don't want to use any other version I extracted architectures arm64 & x86_64 with "lipo -thin" then I created CouchbaseLite.xcframework with xcodebuild -create-xcframework So far this is a success. Note that the fat framework is a static framework, therefore CouchbaseLite.xcframework packages a static framework. I am trying to convert a dynamic framework, lets name it MyFramework that links with CouchbaseLite into a swift package. Since CouchbaseLite is static, no need to carry CouchbaseLite to parent projects, MyFramework should be enough. I have the choice to expose the binary target either directly in MyFramework/Package.swift or in a dedicated Package.swift for CouchbaseLite. I mark "CouchbaseLite" as a dependency .. compiling works fine, but whenever I bring MyFramework as a swift package in a project, import <CouchbaseLite/CouchbaseLite.h> fails to be found. Please, some help. I have tried another approach which is to have CouchbaseLite.xcframework as a resource of package MyFramework, and .process("CouchbaseLite.xcframework") but no luck...
0
0
1.2k
Jul ’20
Class is implemented in both (...)
I have seen that in the past, but in my situation I don't get why..- I have a static OS X framework, let's call it MyFramework.framework.- This framework links against a custom library, libMyStaticLibrary that contains a class MyClass.- MyClass.h is made public in the headers of MyFramework, and MyFramework.h has #import <MyFramework/MyClass.h>- I have an OSX app, MyApp, that links with MyFramework.framework, and makes usage of MyClass...When I go debugging and start doing a print object in lldb, I am prompt this:objc[69744]: Class MyClass is implemented in both /Users/(...)/DerivedData/MyApp/Build/Products/Debug/MyApp.app/Contents/MacOS/MyApp and /Library/Frameworks/MyFramework.framework/MyFramework. One of the two will be used. Which one is undefined.I would like to solve this issue, even though it doesn't seem to be a big deal..
6
1
37k
May ’16
NSTreeController, insert, remove, reorder..with Swift Arrays
Hello there,I am sure people have encountered this issue but I wasn't able to find it around here. Given a NSTableView or a NSOulineView that can be bound with a NSArrayController or a NSTreeController, how does that go with Swift arrays.. Swift Array aren't NSMutableArray, however, removing a selected object seem to work fine. It starts to go wrong when dragging an object to another spot in the collection view.Here is the stacktrace. But the question is, is there a workaround to achieve this without using NSMutableArray.. Imagine you have a complex strong-typed model with different levels of children.-[_TtCs21_SwiftDeferredNSArray removeObjectIdenticalTo:]: unrecognized selector sent to instance 0x618000027980 2016-04-15 20:20:21.954 Test[80244:8446095] ( 0 CoreFoundation 0x00007fff87f394f2 __exceptionPreprocess + 178 1 libobjc.A.dylib 0x00007fff900ddf7e objc_exception_throw + 48 2 CoreFoundation 0x00007fff87fa31ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x00007fff87ea9571 ___forwarding___ + 1009 4 CoreFoundation 0x00007fff87ea90f8 _CF_forwarding_prep_0 + 120 5 AppKit 0x00007fff93350344 -[NSTreeControllerTreeNode removeObjectFromSubNodesAtIndex:] + 516 6 AppKit 0x00007fff932ad41e -[NSTreeController moveNodes:toIndexPath:] + 474 7 Test 0x00000001000030e4 _TFC4Test14ViewController11outlineViewfTCSo13NSOutlineView10acceptDropPSo14NSDraggingInfo_4itemGSqPs9AnyObject__10childIndexSi_Sb + 404 8 Test 0x00000001000031e4 _TToFC4Test14ViewController11outlineViewfTCSo13NSOutlineView10acceptDropPSo14NSDraggingInfo_4itemGSqPs9AnyObject__10childIndexSi_Sb + 100 9 AppKit 0x00007fff93148096 -[NSOutlineView performDragOperation:] + 324 10 AppKit 0x00007fff92dc06dc NSCoreDragReceiveMessageProc + 260 11 HIServices 0x00007fff94454e4a DoMultipartDropMessage + 328 12 HIServices 0x00007fff94454b54 DoDropMessage + 41 13 HIServices 0x00007fff94454b25 SendDropMessage + 80 14 HIServices 0x00007fff944537f3 DragInApplication + 505 15 HIServices 0x00007fff94452611 CoreDragStartDragging + 535 16 AppKit 0x00007fff92dbd435 -[NSCoreDragManager _dragUntilMouseUp:accepted:] + 1010 17 AppKit 0x00007fff92dba623 -[NSCoreDragManager dragImage:fromWindow:at:offset:event:pasteboard:source:slideBack:] + 1212 18 AppKit 0x00007fff92dba155 -[NSWindow(NSDrag) dragImage:at:offset:event:pasteboard:source:slideBack:] + 135 19 AppKit 0x00007fff9314706e -[NSOutlineView dragImage:at:offset:event:pasteboard:source:slideBack:] + 221 20 AppKit 0x00007fff93212d90 -[NSTableView _doImageDragUsingRowsWithIndexes:event:pasteboard:source:slideBack:startRow:] + 539 21 AppKit 0x00007fff93213bdc -[NSTableView _performClassicDragOfIndexes:hitRow:event:] + 329 22 AppKit 0x00007fff92dfad95 -[NSTableView _performDragFromMouseDown:] + 463 23 AppKit 0x00007fff92df9518 -[NSTableView mouseDown:] + 705 24 AppKit 0x00007fff92df901e -[NSOutlineView mouseDown:] + 74 25 AppKit 0x00007fff932ce469 -[NSWindow _handleMouseDownEvent:isDelayedEvent:] + 6322 26 AppKit 0x00007fff932cf44d -[NSWindow _reallySendEvent:isDelayedEvent:] + 212 27 AppKit 0x00007fff92d0e63d -[NSWindow sendEvent:] + 517 28 AppKit 0x00007fff92c8eb3c -[NSApplication sendEvent:] + 2540 29 AppKit 0x00007fff92af5ef6 -[NSApplication run] + 796 30 AppKit 0x00007fff92abf46c NSApplicationMain + 1176 31 Test 0x00000001000045a4 main + 84 32 libdyld.dylib 0x00007fff900c65ad start + 1 33 ??? 0x0000000000000003 0x0 + 3 )Thank you for your help
2
1
1.5k
Apr ’16