Open khashashin opened 2 years ago
[...] and install it on the physical iPhone 13 Pro with the latest system updates.
Just making a note here that this was noted for a physical device, not (yet?) for Simulator
Keyman for iPhone/iPad/Android:
Device: iPhone 13 Pro
OS: latest update
Keyman version 15.0
Target application: Safari
Could you be a bit more explicit here? Particularly, about the "latest update" part - we know that there's an iOS 16.0 beta out there, so it's unclear if you're talking about iOS 15.x or 16.0-beta. Also, as a heads-up, we currently don't plan to address beta-specific issues, as due to the nature of a beta, there's a higher chance of bugs on their end that may be fixed on their end before they fully release 16.0.
I've skimmed through the log messages you attached, and unfortunately... most, if not all, of those constraints are external to the KeymanEngine's system keyboard structure. There's a bunch of stuff about UIButtonBar
in there - that's not used in any way, shape, or form by the framework, nor is UIButtonBarStackView
. There's also a number of mentions of something "Capsule
" in there - that's the first time I've even seen those class names, so far as I can recall.
Also, I'm noticing that you indicate only testing against Safari. I'm not going to downplay that Safari-incompatibility is an issue, as it's definitely an issue... but Safari is fairly complex, so it may help to test against other apps and double-check logs there as well; that should be less to sift through. Have you tried running the keyboard extension in simpler apps like Messenger, Reminders, or Notes? Issues there may yield further insights.
Since you didn't mention either way about it, I'd like to confirm - the project works fine when you launch it as a standard application? Your only issues are when attempting to provide a system keyboard?
Another detail I'd like to check - did you test against Simulator? Does the same issue occur there, or is it only occurring when running the sample app on an actual device?
The most glaring thing to me from the logs is this line:
dyld[13173]: missing symbol called
My understanding is that dyld
is iOS's dynamic-loading system; it's an OS component that helps to link all parts of a program together. (Still wondering what the final 'd' stands for.) The best Windows analogy is that dyld
resolves the iOS equivalent to DLLs. So, even that is technically outside of our app, but it's possible that something went off in the build's linking process that's affecting dyld
. I think.
Unfortunately, Google searches against that aren't yielding any clearly-related results. Most of what I'm seeing seems to indicate that this may be related to build settings or to dependencies in some way. You may want to try doing a clean build and see if that helps, too.
FWIW, I just compiled KMSample2 locally and installed it on my personal iPhone SE 2 (iOS 15.5). I experienced zero problems once I got past the app permissions stuff from the start of item 2 on the referenced help page. I don't have access to an iPhone 13 Pro, so that's the closest attempt to a reproduction I can make at this time.
Could you be a bit more explicit here? Particularly, about the "latest update"
First of all sorry for the misinformation, the device I've tried to run it on was iPhone 12 Pro with Software Version 15.5
Just to be clear I want to describe the steps I've done (Please note this all was done on newly cloned repository:
keyman
repositorystable-15.0
branchkeyman-engine-ios-15.0.267.zip
samples
folder under newly cloned repository with that from keyman-engine-ios-15.0.267.zip
file.keyman/ios
and run:carthage bootstrap --platform iOS --new-resolver --use-xcframeworks
(successful but still missing Sentry)carthage update --platform iOS --new-resolver --use-xcframeworks --no-use-binaries
(successful Sentry is now available)chechen_latin.kmp
in to keyman/ios/samples/KMSample2/Keyboards
group.KMSample
with group.ChechenLatin
Bundle Identifier
for KMSample2 ce.latin.project
for SWKeyboard ce.latin.project.keyboard
SWKeyboard
as running apllicationAllow Full Access
Here is the resulting log output of the steps above:
2022-08-01 05:29:48.522165+0200 SWKeyboard[23127:1537425] [Info] [KeymanEngine] > SWKeyboard Version: 1.0 Build: 1 PID: 23127
2022-08-01 05:29:48.522205+0200 SWKeyboard[23127:1537425] [Info] [KeymanEngine] > XCGLogger Version: 6.1.0 - Level: Info
dyld[23127]: missing symbol called
(lldb)
Have you tried running the app first, before running the system keyboard?
Since you didn't mention either way about it, I'd like to confirm - the project works fine when you launch it as a standard application? Your only issues are when attempting to provide a system keyboard?
Also, in my experience, I usually need to run the app first through Xcode in order for it to force-update it in Simulator (or on a device) before I launch a debug run for the keyboard extension. (I often find it runs an old version otherwise.) Granted, you do seem to be running a bit before hitting the error, so this probably won't fix it, but it'd be helpful to make sure. Not doing so has caused confusing behavior for me in the past, so I'd like to eliminate that possibility here.
@jahorton are the steps I described correct? for what is there build.sh
inside ios/samples/KMSample2
? It seems that performing these steps on different devices produces the same error.
for what is there
build.sh
insideios/samples/KMSample2
?
That build.sh
is for compiling it from scratch, without steps 4-6 and 11 above.
Download Keyman Engine from here particularly this file
keyman-engine-ios-15.0.267.zip
extract everything from this zip file
replace
samples
folder under newly cloned repository with that fromkeyman-engine-ios-15.0.267.zip
file.Fix missing KeymanEngine dependency in xCode by choosing the folder
Instead, that script will build the KeymanEngine dependency in place from the repository itself, including the needed KeymanEngine.xcframework
file. Admittedly, when I attempted a reproduction, this is what I relied upon. There's little chance that this would be the difference in whether or not I can reproduce your issue, though I suppose I should check to be sure.
Also, just to reiterate a question from an earlier response:
Another detail I'd like to check - did you test against Simulator? Does the same issue occur there, or is it only occurring when running the sample app on an actual device?
You mention trying this against multiple devices, but still haven't made mention of any tests run on simulated devices via Xcode. Simulator's usually a perfect match, but occasionally there are some major differences - and if there are, there's a chance that may provide us with a needed clue.
You mention trying this against multiple devices, but still haven't made mention of any tests run on simulated devices via Xcode.
Unfortunately, there is not much difference, if any. I got this error when I ran it on the iPhone 12 Pro Simulator.
First I started KMSample Application and it installed without any problems and I was able to launch it and there were no problems or errors in the logs Then I closed the application and also the simulator and started SWKeyboard. The build was also successful and I was able to add the keyboard and assign permissions without any problems. But then when I selected KMSample Keyboard by long pressing the global icon, the Messanger app froze and I got the following error:
2022-08-03 04:12:03.466818+0200 SWKeyboard[42237:489681] Failed to inherit CoreMedia permissions from 42216: (null)
2022-08-03 04:12:03.472046+0200 SWKeyboard[42237:489508] [Info] [KeymanEngine] > SWKeyboard Version: 1.0 Build: 1 PID: 42237
2022-08-03 04:12:03.472219+0200 SWKeyboard[42237:489508] [Info] [KeymanEngine] > XCGLogger Version: 6.1.0 - Level: Info
dyld[42237]: missing symbol called
CoreSimulator 802.6.1 - Device: iPhone 12 Pro (2E0E8004-FF8B-4E9A-8D7F-B5F7C7855ABF) - Runtime: iOS 15.5 (19F70) - DeviceType: iPhone 12 Pro
(lldb)
OK... so I'm not getting the same error as you are, but I am getting errors when I link in a downloaded version of the framework instead of rebuilding it locally. Granted, this may be because I was using a 15.0 version while on the master
(16.0 development) branch; I'll double-check that, but I don't expect a difference. (Not that this prevented a difference for the test I'm reporting about now!)
Update: I got the same results as before when testing against stable-15.0
, but with the caveat that I reused the Carthage checkout from my master
branch. (My development machine currently has an issue with one of the Carthage builds after a recent macOS update.) This may be a significant point because the error I see is in relation to one of our dependencies retrieved through Carthage... but it will take significant, otherwise-unrelated effort to resolve the issue preventing a more direct test.
well it's not quite that what I did, I mean you probably have now higher versions of dependencies as of master branch. To get the same result and to be able to debug it, I'd recommend you to follow the steps. Since the docs of system keyboard development suggests to download the engine and not to build. I mean others would probably also download it and maybe get this error.
OK... so I'm not getting the same error as you are, but I am getting errors when I link in a downloaded version of the framework instead of rebuilding it locally.
That's what happened when I followed the steps. Not a perfect repro, but it's something tangible on our end to investigate, at least.
Where does build.sh save the KeymanEngine.xcframework file?
Where does build.sh save the KeymanEngine.xcframework file?
The framework will be built to engine/KMEI/build/(Debug|Release)-universal/KeymanEngine.framework
.
The KMSample2 build script will place a copy of that within its own folder.
@jahorton I have builded KeymanEngine via keyman/ios/samples/KMSample2/build.sh
, нow I can run the app in the simulator without the above error.
But I ran into another problem, the keyboard does not see chechen_latin
layout, which I added to the project following the documentation..
Error:
[Error] [KeymanEngine] [ResourceFileManager.swift:360] install(resourcesWithIDs:from:) > Resource with full ID {keyboard: {id = chechen_latin, languageID=ce}} not in package
The languageID
seems to match the BCP 47 tag
. In our case it will be: ce-latn:
// Add a custom keyboard
let kmpFileURL = Bundle.main.url(forResource: "chechen_latin", withExtension: "kmp")!
let keyboardID = FullKeyboardID(keyboardID: "chechen_latin", languageID: "ce-latn")
The layout is now available, but visually empty, although the clicks output the correct characters: dfd
@jahorton I have builded KeymanEngine via
keyman/ios/samples/KMSample2/build.sh
, нow I can run the app in the simulator without the above error.
Apologies that you've had to resort to this for now; please bear with us as we figure out why the workaround is currently necessary.
This line from your log doesn't give us much unexpected info, but for future reference, I'll highlight it just the same:
2022-08-03 07:40:09.474745-0700 KMSample2[89452:695787] [Info] [KeymanEngine] [KeymanWebViewController.swift:348] setKeyboard(_:) > Keyboard stub: {"KP":"chechen_latin","KI":"Keyboard_chechen_latin","KLC":"ce-latn","KN":"Chechen Latin","KL":"Chechen","KF":"file:\/\/\/Users\/gushmazuko\/Library\/Developer\/CoreSimulator\/Devices\/6C51173C-CAB9-413F-9C5E-102D113E5824\/data\/Containers\/Shared\/AppGroup\/CE8EEFAD-D9DF-4831-BF83-9D6CE7C12738\/keyman\/keyboards\/chechen_latin\/chechen_latin.js"}
For both our sanities, allow me to pretty-format the 'stub' this logged:
{
"KP":"chechen_latin",
"KI":"Keyboard_chechen_latin",
"KLC":"ce-latn",
"KN":"Chechen Latin",
"KL":"Chechen",
"KF":"file:///Users/gushmazuko/Library/Developer/CoreSimulator/Devices/6C51173C-CAB9-413F-9C5E-102D113E5824/data/Containers/Shared/AppGroup/CE8EEFAD-D9DF-4831-BF83-9D6CE7C12738/keyman/keyboards/chechen_latin/chechen_latin.js"
}
That matches pretty much what I'd expect; I see no font-related entries, so there shouldn't be any font issues at play here. (If there were, I could see the blank key-cap thing happening that way.)
I also find it very interesting that the key-previews are functioning perfectly despite the standard key caps not displaying. That's very odd.
I see that there was a recent PR for the chechen_latin
keyboard and tried out the currently-deployed version, and I don't see the issue happening with it when I install it within the Keyman app. I figure the answer is "no changes / it should match", but just in case, have you made any changes to the chechen_latin.kmp
you're working with, or should it match the current version in our repository here?
One more important observation from the screenshots - I see that the keyboard appears blank both in-app and as the system keyboard. I wouldn't expect there to be a difference; just making a note of that.
And finally was able to run the keyboard, but using KeymanEngine, which was compiled and imported using the build.sh command Using the downloaded version still doesn't work.
I see that there was a recent PR for the
chechen_latin
keyboard and tried out the currently-deployed version, and I don't see the issue happening with it when I install it within the Keyman app. I figure the answer is "no changes / it should match", but just in case, have you made any changes to thechechen_latin.kmp
you're working with, or should it match the current version in our repository here?
No, there wasn't any changes its the same keyboard. We assume that the problem with the display of characters on the keyboard keys is due to the fact that the simulator was run in a virtual environment (virtual machine in a virtual machine)
Describe the bug I followed this guide to install the keyboard I created with Keyman Developer 15: https://help.keyman.com/developer/engine/iphone-and-ipad/15.0/guides/system-keyboard/
I was able to successfully create the project and install it on the physical iPhone 13 Pro with the latest system updates.
I added the keyboard as a system keyboard in the settings, but when I select it with the "globe" icon, the app freezes and I get the following error in xCode:
In logs there are this:
During the startup process, before I select the keyboard with the "globe" icon, the following logs are displayed (maybe this can also be useful for troubleshooting):
To Reproduce
stable-15.0
branchcarthage bootstrap --platform iOS --new-resolver --use-xcframeworks
carthage update --platform iOS --new-resolver --use-xcframeworks --no-use-binaries
Keyman for iPhone/iPad/Android:
Keyman Developer:
Keyboard