小编Pau*_* T.的帖子

自昨天以来无法将存档上传到应用商店

我成功上传我的应用程序存档的前2天,我的应用程序在应用程序商店,但昨天和今天当我上传存档时,我看到"正在上传存档"消息(带有副标题"发送api用法到itunes连接")开始,然后我看到"iTunes Store操作失败.此操作无法完成.请稍后再试":

在此输入图像描述

当我尝试上传其他应用程序的存档时,一切都很好,这很奇怪,因为从2天前我只将应用程序中的最小年龄从17改为18(所以我没有更改应用程序设置中的所有重要内容).

可能是因为我们使用iAd网络和苹果通知该网络自7月起将无法使用?

在此输入图像描述

iphone objective-c app-store ios iad

51
推荐指数
3
解决办法
2万
查看次数

UIScene概念不清楚

在我们都习惯之前,AppDelegate我们创建UIWindowrootViewController为此设置的方法Window。有时,当我们需要自定义警报时,我们可以创建一个新的警报UIWindow

现在 Xcode 会根据这个场景自动创建UIScene和创建UIWindow。我将不胜感激,如果有人能详细解释如何在现实生活中使用这个场景,什么是他们的主要受益于仅使用UIWindowAppDelegate

因为这篇文章没有解释太多

iphone ios swift uiscenedelegate uiscene

15
推荐指数
2
解决办法
1276
查看次数

iPhone电池耗尽问题

我认为我的问题对其他人有用.我有电池耗尽问题,想知道它在哪里.

我使用xcode工具:输入个人资料 在此输入图像描述 然后是Energy Diagnostics,但我在能源使用方面没有看到任何内容. 在此输入图像描述

如何在"能源使用"部分中启用信息?

iphone xcode battery ios batterylevel

13
推荐指数
1
解决办法
4943
查看次数

命令/Applications/Xcode-beta.app/Contents/Developer/usr/bin/actool失败,退出代码为255

它发生在新的Xcode7 beta中:

CompileAssetCatalog /Users/admin/Library/Developer/Xcode/DerivedData/InstaAd-ddgdnbxlpxipirebpndfmgrxspel/Build/Products/Debug-iphoneos/InstaAd.app InstaAd/Images.xcassets
    cd /Users/admin/Documents/git/InstaAdIOS/InstaAd
    export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode-beta.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/admin/Library/Developer/Xcode/DerivedData/InstaAd-ddgdnbxlpxipirebpndfmgrxspel/Build/Intermediates/InstaAd.build/Debug-iphoneos/InstaAd.build/assetcatalog_dependencies.txt --output-partial-info-plist /Users/admin/Library/Developer/Xcode/DerivedData/InstaAd-ddgdnbxlpxipirebpndfmgrxspel/Build/Intermediates/InstaAd.build/Debug-iphoneos/InstaAd.build/assetcatalog_generated_info.plist --app-icon AppIcon --launch-image LaunchImage --compress-pngs --enable-on-demand-resources YES --filter-for-device-model iPhone7,2 --filter-for-device-os-version 8.4 --target-device iphone --target-device ipad --minimum-deployment-target 8.0 --platform iphoneos --compile /Users/admin/Library/Developer/Xcode/DerivedData/InstaAd-ddgdnbxlpxipirebpndfmgrxspel/Build/Products/Debug-iphoneos/InstaAd.app /Users/admin/Documents/git/InstaAdIOS/InstaAd/InstaAd/Images.xcassets

2015-08-10 14:25:53.366 IBCocoaTouchImageCatalogTool[1054:10336] CoreUI(DEBUG): CSIGenerator using 'LZVN' Compression coreui version (358.000000)
2015-08-10 14:25:56.449 ibtoold[675:6100] An uncaught exception was raised
2015-08-10 14:25:56.450 ibtoold[675:6100] The agent crashed

Application Specific Information:
CoreSimulator 179 - Device: IBSimDeviceTypeiPad1x - Runtime: iOS 9.0 (13A4325c) - DeviceType: …
Run Code Online (Sandbox Code Playgroud)

iphone xcode ios xcode7 xcode7-beta5

12
推荐指数
1
解决办法
8365
查看次数

Siri Integration for payment issue

在我的申请中,我只支持欧元和美元货币.因此,当用户尝试使用Siri向GBP发送付款时,我要求他在EUR和USD之间进行选择.

之后在屏幕上我看到:

  • 100美元
  • 100欧元

如果我选择100美元intent.currencyAmount!.currencyCode我总是有英镑(但用户选择美元).这很奇怪.

这是我的代码:

func resolveCurrencyAmount(forSendPayment intent: INSendPaymentIntent, with completion: @escaping (INCurrencyAmountResolutionResult) -> Void) {
        if let currencyAmount = intent.currencyAmount { // need to check if we have proper value
            if let amount = currencyAmount.amount {

                if amount.doubleValue == 0 { // wrong amount
                    completion(INCurrencyAmountResolutionResult.unsupported())
                    return
                }

                if let currencyCode = currencyAmount.currencyCode {
                    if let _ = EnumCurrency(rawValue: currencyCode) { // we found currency code that we know
                        completion(INCurrencyAmountResolutionResult.success(with: INCurrencyAmount(amount: NSDecimalNumber(value: abs(amount.doubleValue)), currencyCode: currencyCode)))
                        return
                    } …
Run Code Online (Sandbox Code Playgroud)

ios siri swift ios10 sirikit

12
推荐指数
1
解决办法
982
查看次数

SwiftUI 在presentationMode?.wrappedValue.dismiss() 上随机崩溃

这就是崩溃的样子

在此处输入图片说明

所以它在 UIKit 线上随机崩溃

UIKitCore
-[UIViewController _ancestorViewControllerOfClass:allowModalParent:] + 44
Run Code Online (Sandbox Code Playgroud)

我在默认的 SwiftUI 导航堆栈中有视图:

struct MyView: View {
  @EnvironmentObject var viewModel: MyViewModel
  @Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>

var body: some View {
    ZStack {
      ......
    }
    .onAppear {
      self.viewModel
        .onViewAppear(presentationMode: self.presentationMode)
    }
  }
}

final class MyViewModel {
  var presentationMode: Binding<PresentationMode>?

  func onViewAppear(presentationMode: Binding<PresentationMode>) {
    self.presentationMode = presentationMode
  }

  func hide() {
    presentationMode?.wrappedValue.dismiss() // crashes after calling this
  }
}
Run Code Online (Sandbox Code Playgroud)

所以我以这种方式将 MyView 推送到导航堆栈中:

NavigationLink(
      destination: MyView()
    ) {
      Image(systemName: "plus.circle")
        .font(.title)
    }
Run Code Online (Sandbox Code Playgroud)

然后在用户在几秒钟后按下 …

presentation-model uinavigationcontroller swift swiftui environmentobject

9
推荐指数
1
解决办法
424
查看次数

如何将实体框架添加到控制台应用程序(包含图像)

我尝试将实体框架添加到控制台应用程序:我按"添加新项目"和 在此输入图像描述

然后 在此输入图像描述

然后

在此输入图像描述

在此输入图像描述

在此输入图像描述

在此输入图像描述

然后我添加了代码:

    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                Database1Entities db = new Database1Entities();
                db.AddToTableTest(new TableTest { name = "name" });
                db.SaveChanges();

                int count = db.TableTest.Count();
                int ui = 9 + 0;
            }
            catch (Exception e)
            {

            }
        }
    }
Run Code Online (Sandbox Code Playgroud)

它没有出错,但我没有看到数据库有任何变化.我在这里更好地描述了这个问题

c# database asp.net entity-framework objectcontext

7
推荐指数
1
解决办法
2万
查看次数

更改iframe问题的背景颜色

如果是,我需要将背景颜色更改为显示页面的白色<iframe></iframe>.那可能吗?现在原始网站的背景是灰色的.

 <iframe allowtransparency="true" style="background-color: Snow;" src="http://zingaya.com/widget/9d043c064dc241068881f045f9d8c151" frameborder="0" height="184" width="100%">
    </iframe>
Run Code Online (Sandbox Code Playgroud)

我想更改加载页面的背景

html iframe html5 background-color

7
推荐指数
1
解决办法
11万
查看次数

带有自定义语音 mp3 文件的 Android 通话

我是 Android 开发的新手(例如我知道在 iOS 中这是不可能的)。

我知道,我只需要打电话:

Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:" + bundle.getString("mobilePhone")));
context.startActivity(intent);
Run Code Online (Sandbox Code Playgroud)

但是是否可以拨打电话 xxxxxxxxx 然后其他用户应该听到语音文件而不是语音(例如放置在我的 Android 项目中的 mp3 文件)?所以应用程序的唯一任务是拨打一个号码,播放一个文件,然后停止通话。

安卓可以吗?

android phone-call

5
推荐指数
1
解决办法
1980
查看次数

XCTest 不测量 CPU 和内存

我有这个性能测试来检查滚动期间的内存使用情况。

func testMemotyUsage() {
    let app = XCUIApplication()
    let measureOptions = XCTMeasureOptions()
    measureOptions.invocationOptions = [.manuallyStop]

    measure(
      metrics: [XCTMemoryMetric(application: app)],
      options: measureOptions
    ) {
      app.buttons["Listing Page"].tap()

      swipeUp()

      stopMeasuring()

      tapBack()
    }
  }

func tapBack() {
    app.navigationBars.buttons.element(boundBy: 0).tap()
  }

func swipeUp() {
    collectionView.swipeUp(velocity: .fast)
  }

func swipeDown() {
    collectionView.swipeDown(velocity: .fast)
  }

var collectionView: XCUIElement {
    app.collectionViews["collectionViewId"]
  }
Run Code Online (Sandbox Code Playgroud)

但是当我运行测试时,它根本不显示任何指标。

在此输入图像描述

我尝试更新 XCTMemoryMetric(application: app)-> 到XCTMemoryMetric()

在这种情况下,它至少显示了一些结果,但结果不正确,因为正如下面的屏幕截图所示,该应用程序消耗了大约 130 MB 的内存,但测试仅显示 9 KB。顺便说一句,实际内存消耗约为 130-150 MB,因为集合视图中有很多图像。

在此输入图像描述 在此输入图像描述

我猜测它没有显示正确的结果,因为它app没有作为参数传递。虽然当我通过时app,它根本没有显示任何结果

当我编写测试来检查 CPU 使用情况时,会发生同样的问题XCTCPUMetric …

iphone performance-testing ios xctest

5
推荐指数
0
解决办法
447
查看次数