如何从URL快速下载Pdf文件,以及在我的设备的文件管理器中找到文件的位置

问题描述

我已使用以下代码下载了pdf,我也可以在App Data Container中找到该文件,但从App Data Container中,我的设备需要Mac,x代码或iTunesEtc。 我的问题是,我可以给出一个区别路径,例如“文档”还是在iPhone文件中的pdf文件中找到该位置时,我可以选择使用iBook打开文件,但该文件也不存在

热烈欢迎任何建议 我已经尝试了多种指南和解决方案来解决相同的问题(文件下载但在iPhone中找不到),但是其中之一 我下载文件代码在这里 对不起,如果问题令人困惑,我是新手

dict[key]

解决方法

配置您的应用,以使其文件显示在“文件”应用中,方法是在public void playSong(View v) { this.songIntent = new Intent(Main4Activity.this,BackgroundSoundService.class); this.songIntent.putExtra("song","suara_" + randomResult); final Button myButton = (Button) findViewById(R.id.button111); myButton.setVisibility(View.GONE); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean(SHARED_KEY_BUTTON_HIDE,true); editor.apply(); startService(this.songIntent); } 文件中添加以下几行。

Info.plist

OR

就像下面使用Xcode一样

enter image description here

注意:请记住,您必须运行iOS 11或更高版本。