Posts

Post not yet marked as solved
2 Replies
1.2k Views
Hi,Is it possible to watch the WWDC developer video in Apple TV directly, currently, I need to download to watch the video, it's a little in-convenient.Does anybody know how to do it?
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
0 Replies
637 Views
Hi, I am trying the speech recognition API. For live recognition, I use SFSpeechAudioBufferRecognitionRequest It works fine in general. But when I try to use file recognition with SFSpeechAudioBufferRecognitionRequest I found that I can't find a way to cancel the recognition? Cancel or kill the request can't stop the call back from result handler. So I need to wait the recognition finish when I receive the result's isFinal flag is true. It make me a little inconvenient if I try to recognize a long audio file and finally decide to cancel the recognition. Are there some ways to cancel the file recognition directly? Thank you~~ Eric
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
2 Replies
773 Views
I met a strange issue. I got error: dyld: Library not loaded: /usr/local/lib/mylib.dylib Reference from: ..... Reason: image not found I didn't suppose that I need to load library from /usr/local/lib, because it already included in my project. The lib is an embed lib of my project and this issue only happened on my M1 mini? I have try three devices even on MacOS 12.0.1 Then I found the "Runpath Search Paths" seems didn't work on M1 machine. All setting among three machine are the same. (The same source code). Even I use the absolute path on this setting on M1 machine didn't work while others two machine without any problem. Does anybody know what happened? Should I add additional setting on my M1 machine? ps: My project has two level, the problem happen on my second level project which is included in the first level project. I am not sure related to this or not?
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
3 Replies
2.7k Views
I have porting my existing application to support native M1, there a a lot of framework and library that I have already build for both platform. The strange result is when I archive the app on Intel machine. The binary work on Intel platform well. When I archive my application on M1 machine, the app can work on M1 well. But when I try to run app that build on M1 on Intel Machine, then I got the message said my app is damaged and can't be opened. The same situation got for build in Intel platform one. I try "lipo -archs" command on my app and I did get "x86_64 arm64" as result, so my app should already a universal app I guess. Does any body know are there some way to check what happened on my application? Thanks, any opinion will be appreciated ! Eric
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
3 Replies
524 Views
My code was lived well recently. But today after I update my Xcode 13.1.( It ask me to install some components and I always click yes.) Then all code related to core graphic like this can't work now. Not only the code but also the constant like: kCGImagePropertyExifFlash is failed to be recognized too. Does anybody know what happened?  // Write Image CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef bitmapContext = CGBitmapContextCreate(     pBuffer,     imgInfo.nWidth,     imgInfo.nHeight,     8, // bitsPerComponent     4*imgInfo.nWidth, // bytesPerRow     colorSpace,     kCGImageAlphaNoneSkipLast);
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
1 Replies
1k Views
Hi, I am trying to build ffmpeg for Intel and M1 platform for my application. I got some problem, because when I put arm64 dylibs I got error that no x86_64 dylibs available. And I got arm64 dylibs not available when I put x86_64 dylibs. Can I combine these two set of dylibs into a single one then I don't need to change the dylibs on different platform? XCFramework or ?? Thank you. Eric
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
1 Replies
778 Views
Hi,I got the gs_instruments.dls from the sample code. But I can't find any information about this file like the program 10 represent which instrument, note 60 represent which note, ..., etc.Does anybody know where can I find these information about this file?Thank you~~ Really thank anybody can give some idea about these issues.regards,Eric
Posted
by Eric Peng.
Last updated
.
Post marked as solved
1 Replies
494 Views
Hi, I override the drawTickMarks() in NSSliderCell. However, I need to draw some text there and may have a little outside the NSSlider's boundary, so I got some clip in my result. I try to set the maskToBound to false by      self.controlView?.wantsLayer = true     self.controlView?.layer?.masksToBounds = false     self.controlView?.layer?.backgroundColor = CGColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 0.5) So I can clearly see the bounds of slider but the masksToBounds didn't work here. Does anybody know to make the masksToBounds work for my purpose? Thank you~~
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
0 Replies
517 Views
Hi I am using the NSCollectionView to provide the media preview & selection for user. I found the iPhoto application can highlight (with blue border) the selected photo that inside the selection rectangle when I drag mouse ( Didn't go mouse up state yet.) But I can't find the delegate in NSCollectionViewDelegate can help me to implement this feature? Are there any method I can use to implement this feature? I found the delegate shouldChangeItemsAt is called during mouse dragging but the index array is empty? Can I use some setting to make it give me the selected item's array? Thanks Eric
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
3 Replies
1.3k Views
Hi, I am not sure about the real reason of my case, when I use NSWindow of my window's base class, the options (Zoom, Move Window to Left Side of Screen, Move Window to Right Side of Screen, ... etc) that when I hover on the resize button are disabled. But when I change my window's base class to NSPanel, these options are enabled. What I want is disabling all options in the option menu and keeping zoom function only on the resize button. Are there some attribute that I can set to disable these options? Thank you~~ Eric
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
7 Replies
844 Views
I use NSTrackingArea and monitor mouseEntered to simulate hover of the NSButton. But I met a problem between two windows. I have a first window A that was a modal window, then I click a button of window A and popup a window B as a dialog (NSPanel with workWhenModal = true). No matter I use [modal] or [show] setting in segue, I got similar result, when hover is available in window A, then it failed on button of window B. If hover is available in window B, then it failed on button of window A. Is there any way that I can detect mouse move event in both window correctly? Or I need to have different implementation to make mouse move event been detected in both window? Thanks, Eric
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
1 Replies
649 Views
Hi,I met a strange problem when using AVAudioPlayer..I am using Objective-C and create a subclass of AVAudioPlayer..It worked well before iOS 13.2.2. But now I got nil when I call [super init]? Does anybody know what happened? AVAudioPlayer doesn't support after iOS 13.2.2??Thank you~~Eric
Posted
by Eric Peng.
Last updated
.
Post not yet marked as solved
2 Replies
631 Views
Hi I want a make a iap that can let user buy my subscription and content from my server. I check the iap sample in https://developer.apple.com/documentation/storekit/in-app_purchase/offering_completing_and_restoring_in-app_purchases?language=objcand it contains iOS/TVOS and MacOS ....According to the document, it looks like the subscription can be shared between MacOS and iOS?Then I try to add the iap item for my MacOS after I created the iap item list in iOS app.But in MacOS setting, it said I can't create the same product id for my iap item.Can I create a shared subscription between iOS and MacOS?If it not native supported, are there simple way to do this?Thanks~~Eric
Posted
by Eric Peng.
Last updated
.