Apple - FAQ and Common Issues

Unofficial Content

How to enable log using the Knowledge Base Navigator

On your device, go to settings -> Knowledge Base Navigator -> Advanced -> Enable log

KBN Enable Log

Once the log has been enabled, execute your app and then you will be able to check the log from the 'View log' option on your Knowledge Base Navigator:

KBN View Log

 

Which version is supported?

Refer to iOS Requirements for version specific information.

 

How to get the GXFlexibleClient version Number?

The GXFlexibleClient framework is the group of iOS GeneXus standard classes deployed as a framework referenced in your XCode project. During the compilation process you will notice it is automatically installed:

========== iOS Compilation started ==========
Command:MacTransfer compile "myMac" "UserName" "<password>" "KnowledgeBasename" "DashboardName" "IPhoneSim" "C:\Models\Xev2\ios\javaiOS"
Connecting to myMac
Copying Library C:\GX\gxXev2\iOS\YAJLIOS.framework.zip
Copying Library C:\GX\gxXev2\iOS\GXFlexibleClient.framework.zip
Copying File C:\GX\gxXev2\iOS\MacTransfer.scpt to /Users/UserName/Library/Artech/GeneXus/MacTransfer.scpt
Copying File C:\GX\gxXev2\iOS\iphonesim to /Users/UserName/Library/Artech/GeneXus/iphonesim
Synchronizing C:\Models\Xev2\ios\javaiOS\mobile\iOS\DashboardName\ios\Genexus to /Users/UserName/Documents/Projects/ios/DashboardName
Remove File .DS_Store
Updating File DashboardName.xcodeproj/project.pbxproj
Remove Directory DashboardName.xcodeproj/project.xcworkspace
Remove Directory DashboardName.xcodeproj/xcuserdata
Remove File UserControls/.DS_Store
....
Compiling
sshExec: cd ~/Documents/Projects/ios/DashboardName;xcodebuild -sdk iphonesimulator5.0 -configuration Debug clean build 2>&1

To know its version number, check the revision.h file in the folder ~/Library/Artech/GeneXus/GXFlexibleClient.framework/Headers
This number will match the GeneXus Build number used to generate the application.

#define kRevisionNumber 53833

 

Getting Crash Logs and Console Output

Check the following article from Apple: Getting Crash Logs and Console Output

 

Troubleshooting

'Could not load entry points for the specified server URL'  

This error appears when adding a new Knowledge Base to the KBN.

Cause: The URL that it is trying to add is not correct or the server is not working.
Solution: In order to check whether the device can access that URL, open the browser from the device and check if it can access the file /gxmetadata/sdapps.json.
For instance, if the Service URL looks as follows:
http://apps.genexus.com/Id89c7ac6b26874392be79eaf42428194b 
you should try to access the following resource:
http://apps.genexus.com/Id89c7ac6b26874392be79eaf42428195a/gxmetadata/sdapps.json


Code Sign error No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching iPhone Developer were found.

When building a project for iOS the following error may occur

sshExec: cd ~/Documents/Projects/SampleProject/SampleProject;
security list-keychains -s ~/Library/Keychains/login.keychain;
security unlock-keychain -p <password>
~/Library/Keychains/login.keychain;/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk iphoneos7.1 -configuration Release clean build 2>&1
error: Check dependencies
error: [BEROR]Code Sign error: No matching codesigning identity found: 
No codesigning identities (i.e. certificate and private key pairs) matching iPhone Developer were found.
error: [BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
error: 
error: Check dependencies
error: Code Sign error: No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching iPhone Developer were found.
error: CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'

Cause: Well known XCode issue.
Solution: Compile the project from XCode using the "iOS Device" target. The same message will appear with a "Fix Issue" option. You will need to connect using an Apple Id account to resolve the code signing issue and select the Provisioning file. Once the case works from XCode, retry the operation from GeneXus.


'error: Algorithm negotiation fail'

This error occurs when compiling with OS X El Capitan

Cause: OS X El Capitan changed the way SSH connections are established. SSH is used by GeneXus to compile iOS applications on a Mac computer.
Solution: This error has been fixed in GeneXus X Evolution 3 Upgrade 5, for previous GeneXus versions, see SAC #38590.


error: Permission denied (keyboard-interactive)

The following error may occur when compiling an iOS project:

Connecting to machinename
error: Permission denied (keyboard-interactive).
iOS Compilation Failed

Cause: GeneXus couldn't connect with the Mac machine.
Solution: Check your credentials when connecting to the Mac; Mac User or Mac password is wrong. 


error: <unknown>:0: note: '%' was obsoleted in Swift 3

When GeneXus 15 compiles an iOS application it shows a sequence of errors indicating that some code section starting with 'NS' prefix has been renamed without that prefix and tells that these sentences are obsoleted in Swift 3.
For example,

error: /Users/<my_user>/Documents/Projects/<my_project>/Development/RUNMenu/Classes/GXStd.swift:826:11: error: 'NSComparisonResult' has been renamed to 'ComparisonResult'
error: extension NSComparisonResult {
error:           ^08/10/17 10:15 AM08/10/17 10:15 AM08/10/17 10:15 AM~~
error:           ComparisonResult
error: <unknown>:0: note: 'NSComparisonResult' was obsoleted in Swift 3

Cause: When you migrate a Knowledge Base to GeneXus 15, it is probably that old source files won't be generated again, leaving syntax error that are obsoletes in newest versions of Swift language.
Solution: Delete the /mobile/iOS directory of your target environment directory and rebuild-all.


error: Required Xcode version was not found, it must at least X (eg 8.3) and lower than Y (eg 9.0)

Cause: This compilation error happens because the command line tools do not recognize the required version X (see iOS Requirements). 
Solution: Download required version, unzip it, copy it to Applications (See https://stackoverflow.com/questions/43663097/how-to-install-xcode-from-xip-file)
Then open Xcode -> Preferences -> Locations and set the required version in the Command Line Tools option


-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory'

Cause: This error could happen in In High Sierra, at compile time, when using xcode 8.3. Ref.: https://github.com/CocoaPods/CocoaPods/issues/6778
Solution: Execute the following command in your Mac's terminal. If you need to elevate privileges, use sudo command.
> gem install cocoapods


Updating CocoaPods repositories (may take several minutes)

When compiling an iOS application with GeneXus 15 Upgrade 9, the following error is displayed:
Updating CocoaPods repositories (may take several minutes)
sshExec: export LANG=en_US.UTF-8;/usr/local/bin/pod repo update
iOS Compilation Failed

Cause: If your computer has macOS Sierra 10.12.x, it has an old version of Ruby environment. The pod command tries to do a request which only supports TLS 1.2. Check this post for further information.
Solution: You have two alternatives
1) Upgrade your Mac to the latest macOS High Sierra version (10.13.x, as recommended in iOS Requirements).
2) Upgrade your Ruby environment version (check this post).
This problem could also be caused due to an Internet connectivity issue, in such case try running the following command in your Mac's terminal for detailed information:
> export LANG=en_US.UTF-8;/usr/local/bin/pod repo update --verbose 


Errors related to Xcode's derived data

When compiling an iOS application after updating GeneXus or Xcode, you may get compiler errores related to Xcode's derived data.

The error message may vary, here is one example:

error: ld: file too small (length=0) file '/Users/valkimia/Library/Developer/Xcode/DerivedData/SDMenuAAA-cmbhnruplemvsgdocuqgrhplvfwm/Build/Intermediates.noindex/SDMenuAAA.build/Debug-iphonesimulator/SDMenuAAA.build/Objects-normal/x86_64/prcInformaErrorOfflineAAA.o' for architecture x86_64

DerivedData is a folder where Xcode stores all kinds of intermediate build results, generated indexes, etc. Sometimes Xcode tries to use an intermediate result when it is no longer valid (e.g., by changing a GeneXus framework's version, intermediate results linked with the previos version are no longer valid).

In this case, you need to manualy delete the derived data and rebuild your application. To find the derived data folder, go to Xcode, Preferences..., Locations, Derived Data, and click on the small arrow that appears next to the derived data path.


Errors related to updating repo 'GXLocal'

Updating spec repo `GXLocal` fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. 
Use '--' to separate paths from revisions, like this: 
'git <command> [<revision>...] -- [<file>...]'  $ /usr/bin/git -C /Users/macuser/.cocoapods/repos/GXLocal fetch origin  --progress  $ /usr/bin/git -C /Users/macuser/.cocoapods/repos/GXLocal rev-parse  --abbrev-ref HEAD  
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.  HEAD  Use '--' to separate paths from revisions, like this:  
'git <command> [<revision>...] -- [<file>...]' [!] CocoaPods was not able to update the `GXLocal` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

Solution:  Open the Terminal and execute the following commands to recreate the repo GXLocal from scratch:

pod repo remove GXLocal
rm -rf /Users/Shared/Library/GeneXus/GeneXus/CocoaPods

mkdir -p /Users/Shared/Library/GeneXus/GeneXus/CocoaPods
cd /Users/Shared/Library/GeneXus/GeneXus/CocoaPods
git init
echo "GeneXus Local Repo" > README.md
git add README.md
git commit -m "GXLocal Repo Initial commit"
pod repo add GXLocal /Users/Shared/Library/GeneXus/GeneXus/CocoaPods

After this, you should be able to execute without problems the following command:

pod repo update

Is possible that after all these steps, a message like the following appears:

*** Please tell me who you are.
Run  
   git config --global user.email "you@example.com"  
   git config --global user.name "Your Name"
to set your account's default identity.

In that case please execute the commands mentioned in the message, adding an email address and a user name:

git config --global user.email "user@email.com"
git config --global user.name "UserName"

Since GeneXus 16 Upgrade 3, this is not required following that default credentials are set when building the application.


In iOS, when using User Controls or External Objects or other functionalities that are integrated at Extension Libraries (ie Notifications with OneSignal ), the file to open with XCode is the one with the .xcworkspace extension (not .xcodeproj).