我的应用因non-public api电话而被拒绝了.
框架:'/System
/Library
/Frameworks /Foundation.framework /Versions /C /Foundation ' :_ NSErrorWithFilePath :_NSErrorWithFilePathAndErrno
我grep在项目文件夹上找到了一个找到这些方法,就像我在另一个StackOverflow问题上找到的那样,但grep没有提供任何东西.
grep -R '_NSErrorWithFilePath' *
grep -R '_NSErrorWithFilePathAndErrno' *
Run Code Online (Sandbox Code Playgroud)
我怎样才能找到这些方法的位置?
编辑: 我试图导出.app文件,并在它上面我找到了一些东西
Binary file myAppName.app/Contents/Frameworks/libswiftFoundation.dylib matches
Run Code Online (Sandbox Code Playgroud)
什么是解决这个问题的最佳方法?
解决了
从App Review Board得到这个答案:
感谢您联系App Review Board.
App Review Board已完成对您的应用程序申诉的审核***并确定此版本的应用程序未违反指南2.5.1.
我们很快就会将应用程序放回审核流程中.
感谢您对Mac应用程序开发的承诺.
Shin Y. App Review Board
所以显然这是他们身边的一个问题,现在我的应用程序因为今天上午的"审查"而被困,我随时向您发布.
我有一个图片,里面UIImageView有一个默认颜色,让我们说一个自定义的灰色.
在我的代码中,我在某种程度上设置了不同tint的方式
myImageView.image = myImageView.image!.withRenderingMode(.alwaysTemplate)
myImageView.tintColor = someCondition() ? UIColor.red : UIColor.lightGray
Run Code Online (Sandbox Code Playgroud)
事实是,我无法恢复到图像的原始灰色.我的问题是,是否有办法UIColor.lightGray用一些东西来代替我的代码部分,告诉UIImageView 不要使用任何色调,而是它的原始颜色.
我使用的是正常的Button,从Material-UI用于React尝试添加以下的风格
button: {
display: 'inline-block',
padding:0
}
Run Code Online (Sandbox Code Playgroud)
到这个按钮
<Button className={classes.button}> I'm a Test Button </Button>
Run Code Online (Sandbox Code Playgroud)
我得到的是右侧/左侧的填充正确设置为 0,而顶部/底部的填充未更新,请参见附图。
这是一个错误吗?或者实现这一目标的正确方法是什么?
编辑: Material-UI 版本:v1.0.0-beta.20
我想开始我的应用程序和Safari之间的通信.在我的应用程序中,我将数据存储在Keychain中,我知道我可以用来UICKeyChainStore在应用程序之间共享这些数据,但我想知道我是否也可以与Safari本机应用程序共享,使Safari读取存储在Keychain中的一些数据(或者访问我的app数据库)和/或将数据传递给我的应用程序.
我一直在寻找没有成功.我真正想要的是在花时间阅读文档等之前知道它是否" 可能 ".现在的一切都应该在移动设备(iPhone和iPad)上处理.
我发现工作的一个可能的解决方案是创建另一个(2°)应用程序实现一个webView,我可以从我的其他(1°)应用程序传输数据到自动编译字段,但直接访问Safari本机应用程序对我来说会更好目的.
谢谢你的帮助.
我正在按照本教程http://www.raywenderlich.com/64546/introduction-to-cocoapods-2安装cocoapods在我的MacBook上(Mavericks 10.9.5).
我已成功使用此命令
sudo gem update --system
sudo gem install cocoapods
Run Code Online (Sandbox Code Playgroud)
但是每当我使用时,pod setup我都会得到这个日志
/Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/xcodeproj-0.19.3/lib/xcodeproj/plist_helper.rb:140:in `<module:CoreFoundation>': uninitialized constant Fiddle::NULL (NameError)
from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/xcodeproj-0.19.3/lib/xcodeproj/plist_helper.rb:70:in `<top (required)>'
from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/xcodeproj-0.19.3/lib/xcodeproj/ext.rb:2:in `<top (required)>'
from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/xcodeproj-0.19.3/lib/xcodeproj.rb:25:in `<top (required)>'
from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/cocoapods-0.34.2/lib/cocoapods.rb:2:in `<top (required)>'
from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
from /usr/local/Cellar/ruby193/1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:69:in `require'
from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/gems/cocoapods-0.34.2/bin/pod:32:in `<top (required)>'
from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/bin/pod:23:in `load'
from /Users/tommy/.rvm/gems/ruby-2.1.1@msf/bin/pod:23:in `<main>'
Run Code Online (Sandbox Code Playgroud)
如果我打字也会出现pod install.
我该怎么办?提前致谢
是否可以在WatchOS 4+中访问共享钥匙串?我已经为iOS应用程序设置了完全相同的“ 钥匙串共享”>“钥匙串组 ”(与MacOS应用程序完美同步),但是发现的只是一个空对象。
我正在使用此库(https://github.com/kishikawakatsumi/KeychainAccess),该库在iOS和上都非常有效MacOS,但不适用于WatchOS。
我向Watch扩展共享了相关类的目标成员资格(我认为它可以正常工作,否则会抛出一个错误,该错误能够获取该方法左右),将pod像这样添加到watchOS
use_modular_headers!
def shared_pods
pod 'KeychainAccess'
end
target 'Watch Extension' do
platform :watchos, '4.0'
shared_pods
end
Run Code Online (Sandbox Code Playgroud)
我的问题是:我是否缺少某些配置?看起来它能够访问本地钥匙串,但无法与共享钥匙串同步。
谢谢
我有我的App.js类呈现为
const theme = createMuiTheme({
palette: {
primary: lime,
secondary: {
...grey,
A400: '#00e677'
},
error: red
}
});
class App extends Component {
render() {
const classes = this.props.classes;
return (
<div className={classes.root}>
<MuiThemeProvider theme={theme}>
<MyApp/>
</MuiThemeProvider>
</div>
);
}
}
export default withStyles(styles)(App);
Run Code Online (Sandbox Code Playgroud)
我的根类有这种风格
const styles = theme => ({
root: {
width: '100%',
height: '100%',
marginTop: 0,
zIndex: 1,
overflow: 'hidden',
backgroundColor: theme.palette.background.default,
}
});
Run Code Online (Sandbox Code Playgroud)
我认为通过设置height:'100%'我已经填满了所有窗口,问题是我MyApp的div 下面有一个空白区域(灰色背景),见附图.
如何强制背景颜色填充100%的窗口?
我正在尝试创建一个NSTimer,它由前台用户手动启动,正如预期的那样完美:
timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: Selector("updateCounter"), userInfo: nil, repeats: true)
Run Code Online (Sandbox Code Playgroud)
这里updateCounter()只是一个更新UILabel的用户界面.现在我想要实现的是在用户离开应用程序时也让它运行.我google了一些东西,发现这个代码(我在Swift中翻译):
func applicationDidEnterBackground(application: UIApplication) {
var bgTask = UIBackgroundTaskIdentifier()
bgTask = UIApplication.sharedApplication().beginBackgroundTaskWithExpirationHandler { () -> Void in
UIApplication.sharedApplication().endBackgroundTask(bgTask)
}
// Start the long-running task and return immediately.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { () -> Void in
var vc = TimerViewController()
// Fire some methods
UIApplication.sharedApplication().endBackgroundTask(bgTask)
bgTask = UIBackgroundTaskInvalid
});
}
Run Code Online (Sandbox Code Playgroud)
基本上我从这里可以理解的是,当app到达背景时,我可以从我的一个新实例中激活一些方法TimerViewController(),这个方法应该处理NSTimer后台阶段.
现在这是否意味着我需要使用这个vc或另一个方法,NSTimer从前景一个停止的确切时间(因为app进入后台)开始另一个方法?
如果是,请NSTimer在用户再次打开应用程序时重新启动我的第一个(意味着前景:D)我应该如何表现?停止第二个NSTimer并使用更新的计数器恢复第一个?
实际上,即使是解决方案的草图也很受欢迎,我只想弄清楚如何处理这种情况. …
我有一个viewcontroller,我需要知道何时iPad进入分屏多任务模式,以便相应地调整视图元素的大小。
发生这种情况时触发的方法是什么delegate?
使用UITableView它很容易找到indexPath基于单元格的
tableView.indexPath(for: cell)
Run Code Online (Sandbox Code Playgroud)
但不幸的是,在MacOS上这种方法不存在。
我的用例如下:
我有一个按钮,Cell View单击后,我将调用委托ViewController做事情。现在我有了该单元格的实例,我想要获取的是它在中的行(位置)NSTableView。我如何获得它?
这是我的代码 UNUserNotification
func scheduleNotification() {
UNUserNotificationCenter.current().getNotificationSettings { (notificationSettings) in
switch notificationSettings.authorizationStatus {
case .notDetermined:
self.requestAuthorization(completionHandler: { (success) in
guard success else { return }
// Schedule Local Notification
self.scheduleLocalNotification()
})
case .authorized:
// Schedule Local Notification
self.scheduleLocalNotification()
case .denied:
print("Application Not Allowed to Display Notifications")
}
}
}
private func scheduleLocalNotification() {
// Create Notification Content
let notificationContent = UNMutableNotificationContent()
// Configure Notification Content
notificationContent.title = "Hello"
notificationContent.body = ""
// Add Trigger
let notificationTrigger = UNTimeIntervalNotificationTrigger(timeInterval: 10.0, repeats: false) …Run Code Online (Sandbox Code Playgroud) 我正在连接到本地主机上的服务器以获取一些数据。返回到此请求的数据是 JSON,在Postman上正确显示了 JSON,但是当我使用 iOS 时,Alamofire 返回一个错误:
responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.jsonSerializationFailed(Error Domain=NSCocoaErrorDomain Code=3840“垃圾在最后。” UserInfo={NSDebugDescription=垃圾在最后。}))
有问题的 JSON 是:
{
"name": "TestName",
"surname": "TestSurname"
}
Run Code Online (Sandbox Code Playgroud)
我不明白的是,如果我强制我的服务器以字符串的形式返回 json,那么就像
"{"name": "TestName after update","surname": "TestSurname"}"
Run Code Online (Sandbox Code Playgroud)
Alamofire 不会抱怨并正确解析它。那个怎么样?我认为指定参数responseJSON它会反过来工作。
Alamofire.request("http://192.168.1.4:8080/user/abcdf").validate().responseJSON { response in
switch response.result {
case .success:
// DO stuff
case .failure(let error):
print(error)
}
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试将Braintree集成到我的网站中以接受付款,并且我对多货币支持有两个问题。
首先,我要说的是,由于我居住在欧盟,因此我已经创建了一个接受EUR的帐户。
现在,假设有一个美国人想在我的Web应用程序上购买东西。他显然有一张与美元银行帐户绑定的信用卡。阅读文档后,我发现在Braintree中我无法指定货币,因此在这种情况下10,我的金额为10欧元
gateway.transaction.sale({
amount: 10,
paymentMethodNonce: nonceFromTheClient,
options: {
submitForSettlement: true
}
})
Run Code Online (Sandbox Code Playgroud)
这意味着我必须在我的网站上显示
Would you like to buy this item for 11.16 USD?
Run Code Online (Sandbox Code Playgroud)
其中11.16是当前转换率(在撰写本文时)。
这是正确的方法吗?我对此有两个怀疑的理由:
您能帮我了解解决此问题的正确方法吗?
每次我从外国网站上购买商品时,都会获得以欧元显示的转换,并且已被收取了确切的金额,但是在Braintree上,我不知道该怎么做。
提前致谢
ios ×8
swift ×6
xcode ×4
material-ui ×2
reactjs ×2
alamofire ×1
background ×1
braintree ×1
cocoapods ×1
css ×1
json ×1
keychain ×1
macos ×1
nstableview ×1
nstimer ×1
paypal ×1
safari ×1
terminal ×1
uiimageview ×1
watchkit ×1