This could potentially be an issue with iPhone X. But it could also be an issue with your wifi or the router/firewall preventing service discovery from working.
I believe that crashes are written as logs on disk. They should be accessible from XCode->Some_menu->Devices->Your Device->Logs. There’s also a tool called deviceconsole that you can build and then run from the terminal to get live logs from a connected iOS device.
Found the crash log, this is some readable text from that log.
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: TCC, This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.
Triggered by Thread: 15
Ah, I see. So that’s an iOS 10 requirement that the info.plist must specify why the app is using the camera. You can provide your own custom info.plist file. The original can be found inside bob.jar, downloadable from d.defold.com. Download bob.jar, change file extension from jar to zip and unpack. The info.plist is in /com/dynamo/bob/bundle/resources/ios/Info.plist. Make a copy and put it in your project. Add the NSCameraUsageDescription key and value. Point to the Info.plist from your game.project.
Yeah, sorry, found it. and then, do i put the file in the same directory as the game.project file? and that is the root of the project? so in the game.project input field i just write info.plist? It is now showing in git or defold editor as a new file when adding the it to this place.
when clicking the “…” after infoplist input field the popup is empty, but thats probably because i cant se it at all in git or the editor?
also when running :
"ios-deploy --bundle app.ipa"
im getting:
2017-12-07 08:23:31.814 ios-deploy[66764:1630694] [ !! ] Error 0xe8008015: A valid provisioning profile for this
executable was not found. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Yes. And you have the info.plist file right next to game.project? And you can see it in Finder or from the Terminal?
This indicates a problem with your provisioning profile. Hard to tell what’s wrong. Have you exported a matching provisioning profile for your device? Have you plugged in your device and gone to XCode->Devices and waited for the process that will enable the device for development?
Can you build and install non-Defold projects from XCode on your device?
Got it to work finally, in the new editor, 2 i could find the info.plist. i can now install the builds and the info.plist worked, it throws up the native “Wanna use camera” and then i can use it.
But! hehe… now when trying to capture an image nothing happens, guess i am getting som error, but i cant se that when on the device!? it works on OSX.
No, they are made on different places, the first one when I capture an image and the second one when I want to make a file to send it to the server. Is it possible to make a file directly from the png_bytes instead so I don’t have to use these 2 lines at all? at the moment i need the file in this code to be able to sent it to the server.
local file = io.open("camerasnapshot.png", "rb")
local current = file:seek() -- get current position
local file_size = file:seek("end") -- get file size
file:seek("set", current) -- restore position
local resp = {}
local body,code,headers,status = httpSocket.request{
url = "http://server.se/upload.php",
method = "POST",
headers = {
["Content-Type"] = "application/x-www-form-urlencoded",
["Content-Length"] = file_size,
["filename"] = imageFileName
},
source = ltn12.source.file(file),
sink = ltn12.sink.table(resp)
}
Ok, so one problem is that you’re likely not saving and loading the file from a writable folder on your device. You need to use sys.get_save_file(), like this:
local path = sys.get_save_file("yourappnamehere", "camerasnapshot.png")
local file = io.open(path, "rb")
I didn’t mention this in my original reply. Sorry about this.
BUT if you want to send the bytes immediately and never save them then I believe you can do:
Yes, that “sys.get_save_file…” solved my problem, thx alot, you want to hear my next 2 ones? probably not huh!!
I cant get the GUI/App to resize over my whole screen, 2436 × 1125, at the moment i have 750x1334 in game.project on the resolution input, that looks the best it shows full width(scaled i guess) but only 3/4 of the height, but at least centered so this looks the best so far.
Also the app icon i have in different sized images on every input in game.project input, but they all come out the same on the phone, a small version, maybe 2/4 sized inside a black app icon in the correct size that probably the device itself fixes.