ios-app-extension

Recording video with iOS broadcasting extension

我怕爱的太早我们不能终老 提交于 2021-01-20 04:48:30
问题 I'm trying to tweak the iOS broadcasting extension feature to record the video instead of live streaming. It seems possible because you can get pixel buffer in processSampleBuffer:withType: method. Then I have coded like below but it fails when appending the buffer. I'm familiar neither to AVAssetWriter nor App Extension programming so I cannot figure out what's wrong here. Am I doing something we're not supposed to do in the extension? Or the usage of AVAssetWriter is wrong? Any idea is

Recording video with iOS broadcasting extension

懵懂的女人 提交于 2021-01-20 04:48:06
问题 I'm trying to tweak the iOS broadcasting extension feature to record the video instead of live streaming. It seems possible because you can get pixel buffer in processSampleBuffer:withType: method. Then I have coded like below but it fails when appending the buffer. I'm familiar neither to AVAssetWriter nor App Extension programming so I cannot figure out what's wrong here. Am I doing something we're not supposed to do in the extension? Or the usage of AVAssetWriter is wrong? Any idea is

A warning “'init()' is deprecated”. [Swift, Ios app, learning model]

流过昼夜 提交于 2020-11-29 18:57:03
问题 I am making a image classification iOS app with Swift. When I write guard let model = try? VNCoreMLModel(for: SqueezeNet().model) else { return } I got this warning. 'init()' is deprecated: Use init(configuration:) instead and handle errors appropriately. Do you know how to get rid of it? 回答1: As the message notes, init() is deprecated. The new initializer takes a configuration parameter. The default configuration may be fine for you, in which case you would replace SqueezeNet() with:

A warning “'init()' is deprecated”. [Swift, Ios app, learning model]

人走茶凉 提交于 2020-11-29 18:56:43
问题 I am making a image classification iOS app with Swift. When I write guard let model = try? VNCoreMLModel(for: SqueezeNet().model) else { return } I got this warning. 'init()' is deprecated: Use init(configuration:) instead and handle errors appropriately. Do you know how to get rid of it? 回答1: As the message notes, init() is deprecated. The new initializer takes a configuration parameter. The default configuration may be fine for you, in which case you would replace SqueezeNet() with:

How to debug an iOS app extension?

淺唱寂寞╮ 提交于 2020-07-05 09:14:02
问题 I'm trying to debug an iOS app extension and all I can do is to set breakpoints but it would be nice to be able to print to console. Is this possible with Xcode 9? Or at least read it somewhere, maybe a file? I went to see my device's logs in "devices and simulators" but could't find what I printed from my iOS app extension. 回答1: You can debug an app extension like any other app by just choosing target and device and then running the extension. You need to choose an app to run with the

How to debug an iOS app extension?

倾然丶 夕夏残阳落幕 提交于 2020-07-05 09:11:29
问题 I'm trying to debug an iOS app extension and all I can do is to set breakpoints but it would be nice to be able to print to console. Is this possible with Xcode 9? Or at least read it somewhere, maybe a file? I went to see my device's logs in "devices and simulators" but could't find what I printed from my iOS app extension. 回答1: You can debug an app extension like any other app by just choosing target and device and then running the extension. You need to choose an app to run with the

iOS8 extension needs own provisioning profile?

怎甘沉沦 提交于 2020-05-09 18:25:20
问题 I am starting an iOS 8 extension but I can't run it on my device. The error when trying to run it is: No matching provisioning profiles found The provisioning profile specified in your build settings (“ExtensionName”) has an AppID of net.company.AppName which does not match your bundle identifier net.company.AppName.ExtensionName . Xcode can resolve this issue by downloading a new provisioning profile from the Member Center. Do I need a separate provisioning profile for both the main app and

iOS8 extension needs own provisioning profile?

我是研究僧i 提交于 2020-05-09 18:24:21
问题 I am starting an iOS 8 extension but I can't run it on my device. The error when trying to run it is: No matching provisioning profiles found The provisioning profile specified in your build settings (“ExtensionName”) has an AppID of net.company.AppName which does not match your bundle identifier net.company.AppName.ExtensionName . Xcode can resolve this issue by downloading a new provisioning profile from the Member Center. Do I need a separate provisioning profile for both the main app and

Background task in iOS action extension

眉间皱痕 提交于 2020-04-08 08:54:06
问题 I'm working on an action extension for an app which prepares some data for the user and then uses MailCore2 to send this information to a SMTP server. Preparing data is done very fast, but sending the email might take some time (depending on its size). That's why I'm looking for a way to handle the sending activities in the background. But this results in some problems with different solutions: Using URLSession . This is the first way to go for handling big uploads or downloads in an iOS

How to detect if code is running in Main App or App Extension Target?

牧云@^-^@ 提交于 2020-02-12 07:28:06
问题 Does anyone know how you detect from within your code if you're running inside an App Extension? I have an app which shares classes between an app and an extension. The app code uses [UIApplication sharedApplication] but this isn't available from within an extension, so it won't compile saying: 'sharedApplication' is unavailable: not available iOS (App Extension) So I need a way to detect that I'm in the extension and use an alternative to sharedApplication if that's the case. 回答1: You can