Merhabalar, yaptığım bir iOS uygulamasında localden html dosyası çalıştırıyorum. Tabi içinde gömülü javascript dosyaları da var. Ancak içine yazılmış olan javascript bir resim dosyası kullanıyor. Ben de bu resmi albümden seçtirmek istiyorum. Bunun için resmi albümden alıp uygulamanın Documents klasörüne kopyalıyorum, ancak javascriptten erişemiyorum. Aşağıda js'in resmi alan bölümünün bir parçası var. Bunun bir çözümü var mıdır?
stackoverflow linki(ayrıca orada da farklı bir açıklama yapmıştım): ios - Is it possible to read documents folder of app by javascript? - Stack Overflow
function basicLoad(location) {
var possible = ['image'];
var file = 'img/' + possible[Math.floor(Math.random() * possible.length)] + '.png'
return {
file: file,
shownFile: location.protocol + '//' + location.host + location.pathname + file
};
}
//DENEDİKLERİM
var file = '/Documents/' + possible[Math.floor(Math.random() * possible.length)] + '.png'
var file = '//Documents/' + possible[Math.floor(Math.random() * possible.length)] + '.png'
var file = '/Documents/' + possible[Math.floor(Math.random() * possible.length)] + '.png'
var file = 'app://Documents/' + possible[Math.floor(Math.random() * possible.length)] + '.png'
stackoverflow linki(ayrıca orada da farklı bir açıklama yapmıştım): ios - Is it possible to read documents folder of app by javascript? - Stack Overflow
function basicLoad(location) {
var possible = ['image'];
var file = 'img/' + possible[Math.floor(Math.random() * possible.length)] + '.png'
return {
file: file,
shownFile: location.protocol + '//' + location.host + location.pathname + file
};
}
//DENEDİKLERİM
var file = '/Documents/' + possible[Math.floor(Math.random() * possible.length)] + '.png'
var file = '//Documents/' + possible[Math.floor(Math.random() * possible.length)] + '.png'
var file = '/Documents/' + possible[Math.floor(Math.random() * possible.length)] + '.png'
var file = 'app://Documents/' + possible[Math.floor(Math.random() * possible.length)] + '.png'