为什么我的应用程序不能像在模拟器上那样在iPhoneX上运行?

时间:2019-03-15 19:53:31

标签: ios iphone-x

在iPhone X 12.1.4 vs模拟器上运行我的应用程序时出现问题。我正在使用Xcode 10.1。当我连接到模拟器时,一切正常运行,但是当我在手机上运行它时,在此行出现错误:

let request = RideRequest(snapshot: self.rideRequests[indexPath.row])

错误:

Missing argument for parameter 'username' in call

此外,当我在手机上安装时单击按钮时,该应用程序会崩溃,但在模拟器上运行时-不会崩溃,并且应能正常工作。

另一件事:

 When I run and install on simulator no errors appear on Xcode but when
 I run and install on my iPhoneX, the 'red' ! mark appears with the
 error in Buildtime as a Swift Compiler Error but it will still install
 and run on the iPhone but for some reason crashes when button is 
 pressed.

RideRequest:

public RideRequest(String userId, String username, String currentAddress, String destAddress, Double latitude, Double longitude, Double destLat, Double destLong, Double ridePrice)

有什么想法吗?

0 个答案:

没有答案